Questions tagged [statistical-test]

A statistical test provides a mechanism for making quantitative decisions about a process or processes.

Statistical Tests

A statistical test provides a mechanism for making quantitative decisions about a process or processes. The intent is to determine whether there is enough evidence to reject a conjecture or hypothesis about the process. The conjecture is called the null hypothesis. Not rejecting may be a good result if we want to continue to act as if we believe the null hypothesis is true. Or it may be a disappointing result, possibly indicating we may not yet have enough data to prove something by rejecting the null hypothesis.

264 questions
30
votes
4 answers

Implementing a Kolmogorov Smirnov test in python scipy

I have a data set on N numbers that I want to test for normality. I know scipy.stats has a kstest function but there are no examples on how to use it and how to interpret the results. Is anyone here familiar with it that can give me some…
Hooloovoo
  • 865
  • 2
  • 11
  • 21
25
votes
2 answers

Kolmogorov-Smirnov test in R

I tried to use the Kolmogorov-Smirnov test to test normality of a sample. This is a small simple example of what I do: x <- rnorm(1e5, 1, 2) ks.test(x, "pnorm") Here is the result R gives me: One-sample Kolmogorov-Smirnov test data: x D =…
gagaouthu
  • 299
  • 1
  • 3
  • 9
8
votes
1 answer

Suppress output of stationarity test that is printed to screen

How do I get the stationarity test from the fractal package in R to not print any output to the screen. For example, with the shapiro.wilk test when setting the result as a variable it does not give any output as follows lg.day.ret.vec <-…
Vik
  • 469
  • 2
  • 6
  • 18
5
votes
2 answers

Kruskal - Wallis p-value matrix for data subsets with R

Consider a dataset Data which has several factor and several numerical continuous variables. Some of these variables, let's say slice_by_1 (with classes "Male", "Female") and slice_by_2 (with classes "Sad", "Neutral", "Happy"), are used to 'slice'…
GegznaV
  • 4,938
  • 4
  • 23
  • 43
4
votes
0 answers

How to choose a value for the maxlag parameter in Python statsmodels adfuller?

I have monthly data about clicks on websites and want to build a SARIMA model to predict the next month's expected clicks. Because a SARIMA model needs to work with stationary data, I transformed the data and carried out the Augmented Dickey Fuller…
LBoss
  • 496
  • 6
  • 15
4
votes
1 answer

Comparing datasets to nonstandard probability distributions in Python

I have a few large sets of data which I have used to create non-standard probability distributions (using numpy.histogram to bin the data, and scipy.interpolate's interp1d function to interpolate the resulting curves). I have also created a function…
4
votes
1 answer

How to save the results of R statistical tests in Java

I'm working with R on my Java programs and I need to use some statistical tests, such as anova. But I don't know how to save the R results in a file to manage them later in Java. I try RCaller and rJava to join R and Java, but I think the problem is…
3
votes
1 answer

Kolmogorov-Smirnov Test in Python for Goodness of fit

I am trying to get the best distributions for my data. The fitting is finished as shown in below figure, but i need a measurement, to choose the best model. I compared goodness of fit with a chi-squared value, and test for significant difference…
3
votes
2 answers

Export coxph summary from R to csv

How to export summary of cox_proportional hazard model from R to csv. I ran a test by function coxph. by survival package Now i want to export its summary to csv, how to do that. c <- coxph(Surv(x~y)) summary(c)
Aryh
  • 479
  • 1
  • 4
  • 16
3
votes
1 answer

Difference in means test on pandas's summary statistics?

I am looking to perform a difference in means test on the summary statistics of two DataFrames. df1[['sd']].describe() sd count 5000.000000 mean 0.635558 std 0.086109 min 0.492922 25% 0.577885 50% …
Lieu Zheng Hong
  • 676
  • 1
  • 10
  • 22
3
votes
1 answer

R - how to get data into block form for friedman test?

enter image description hereI have some data relating to levels of a chemical in the blood before and after treatment and there are 4 treatment groups - ABCD. I have been told I can run a Friedman test to compare all of these variables at once. The…
Alex
  • 33
  • 4
3
votes
0 answers

How do you create a Kolmogorov-Smirnov chart in python for a 2 sample string lists?

I am having difficulty in creating a Kolmogorov-Smirnov chart for 2 sample string lists that will display Cumulative Distribution Function (CDF)? As shown in Two-sample Kolmogorov–Smirnov test I have been able to calculate the…
3
votes
2 answers

interpreting the Anderson darling test scipy

Interested in knowing how to Interpret the result of the Anderson darling test in python. It seems as though the AD stat has to be lower then the critical value at its associated significance level though I am not sure how to properly determine this…
pete lee
  • 95
  • 1
  • 10
3
votes
0 answers

How to compare the results of different statistical tests?

I don't know if it is a good question or not. Here's the case, say I have a scale/continuous dependent variable and a bunch of independent variables. My ultimate goal is to build a model to predict/estimate the dependent variable using these…
G. Yu
  • 31
  • 1
3
votes
1 answer

How to perform a bootstrapped paired t-test in R?

I would like to perform a bootstrapped paired t-test in R. I have tried this for multiple datasets that returned p<.05 when using a parametric paired t-test however when I run the bootstrap I get p-values between 0.4 and 0.5. Am I running this…
1
2 3
17 18