Questions tagged [hypothesis-test]

Functions used to choose between competing hypotheses about one or more probability distributions. For statistical questions, please use stats.stackexchange.com.

Common hypothesis tests include the one-sample and paired t-test for means, the z-test, which approximates the t-test for large samples, F-test for differences in variance, and Chi-square test for independence, and Fisher's exact test for differences in proportion.

Please note that this tag is totally different from , which refers to software testing.

349 questions
1
vote
0 answers

How to get the Monte Carlo simulation of power for Kolmogorov-Smirnov test?

I am trying to reproduce the simulation results on Razali & Wah's 2011 article "Power comparisons of Shapiro-Wilk, Kolmogorov-Smirov, Lilliefors, and Anderson-Darling tests" which appeared in the Journal of Statistical Modeling and Analytics. My…
oliver
  • 157
  • 9
1
vote
1 answer

Hypothesis strategies for pydantic nested classes

For our API, I started using hypothesis on top pydantic, in order to enhance test test suite with autogenerated data. Our protocol is hierarchical, so comes easy to me to describe it with nested classes in pydantic: from pydantic import BaseModel,…
Glauco
  • 1,385
  • 2
  • 10
  • 20
1
vote
1 answer

Comparing two sets of probabilities to see which one is a better predictor of the outcome

Suppose there are two columns of the probability that the home team wins a given match and then a column at the end indicating whether the home team won or not. Looking like this: prob_1 prob_2 WinHomeTeam 0.495 0.541 1 …
sak
  • 113
  • 1
  • 10
1
vote
1 answer

Finding confidence interval for the second level of a categorical variable in R commander

I am going to determine the confidence interval for the proportion based on dataset "CES11" dataset which is included in R. The variable that I have used for the test is Abortion and the values are "No" and "Yes". I want to find the confidence…
1
vote
0 answers

Planned Contrasts using statsmodels

I was wondering if there is a way to check planned contrasts using the package statsmodels (or any other python package). About the data: Imagine having a dependent Variable Y and two independent variables (factors): A with levels a1,a2,a3 and B…
rnesti
  • 11
  • 3
1
vote
1 answer

How to add additional components to htest object

I am trying to write my own function much similar to var.test(). I would like my output to look similar to that of var.test(), and it seems that var.test() assigns the output list to the class htest. I want to do something similar, but add an…
feonyte
  • 11
  • 1
1
vote
0 answers

Test differences in multimodal distributions for different groups in R or Python

I am analyzing data from 3 different gait speeds. For each group/speed, I am determining specific value called "angle". Each group has different sample size. So, I need to compare multimodal distributions and I would like to statistically test…
1
vote
1 answer

Testing for the significance of a random effect in a mixed model

This might be a better post for "Cross Validated" so I will post it there too, so I apologize if this is out of the scope of this discussion board. I am working with the lme4 package and would like to test the significance of the random effect. I am…
z_11122
  • 153
  • 8
1
vote
1 answer

Output of chi-square as vector

I use the chi-square goodness of fit test with chisq.test(). Is there a way to save the output of this function as a vector, like: test <- c(X-squared, df, p-value)?
Mikhail
  • 37
  • 5
1
vote
1 answer

Chi-Squared Test Returning Infinity

I fitted some data to a Poisson distribution, the data is as follows: observed <- c(290, 630, 873, 853, 618, 310, 138, 54, 21, 9, 4) estimated_prob_mass <- c(0.064, 0.176, 0.242, 0.222, 0.152, 0.084, 0.038, 0.015, 0.005, 0.002, 0.000) Visually, the…
1
vote
0 answers

Bayesian informative hypotheses testing

I work on a Bayesian project, and I have a question regarding Bayesian informative hypothesis testing in r. I use the 'bain' package to see what hypothesis is favored. I did a multiple linear regression: data(trees) # R's trees…
1
vote
0 answers

Is there a function in R Survey library that tests equality of weighted proportions for a single variable?

Let's say I have a survey question on political party affiliation - Democrat, Republican, Independent, Other. I want to test whether the weighted proportions are equal. I cannot use Base R functions because they don't take account of sampling…
user242
  • 11
  • 2
1
vote
2 answers

Normality test for multi-grouped data in R

I'm trying to run a normality test over my data in R. My dataset is a data frame formed by 4 columns of characters and one column with numeric values. At the moment, I'm using the Rstatix package in R and other types of statistical tests are working…
1
vote
1 answer

Implementing Binomial Hypothesis Testing significance tests in Power BI (DAX)

This is partly a theory question, and partly an implementation question. My stats is a little rusty... I am developing a report that is attempting to determine if the difference in occurances between a reference group and a selected group are…
Ryan Fry
  • 61
  • 2
1
vote
1 answer

Hypothesis.strategies generate string from date

I am using hypothesis to test my application and generate random input data for endpoints. Here is my code: def generate_upload_data(): today = datetime.date.today() start_date = today - relativedelta(months=1) return…