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
0
votes
1 answer

Contradictory results in Matlab signrank function (Wilcoxon signed rank test)

Here are the errors of my proposed algorithm and the benchmark algorithm: >> [algo_err benchmark_err] ans = 0.3000 0.2000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 0.1000 …
Dang Manh Truong
  • 795
  • 2
  • 10
  • 35
0
votes
0 answers

Testing the relative signifance of variables in glm

I am working through the practical sheet at this link: http://www.statslab.cam.ac.uk/~rds37/teaching/statistical_modelling/Practical6.pdf In exercise 3, it is stated that to test whether the mother's myopia and father's myopia is equally…
ThanksABundle
  • 385
  • 1
  • 8
0
votes
1 answer

Invalid argument in the lsmeans model?

I am getting the error saying lsmDrugs=lsmeans(model1, -drug) Error in -drug : invalid argument to unary operator" Any help please? library(knitr) library(lsmeans) drug <- c(rep("A", 2),rep("B", 2),rep("C", 2)) drugDiff <- c(-14, -4, 5, -1,…
user8826976
0
votes
0 answers

How to judge the results of the Wilcoxon test?

all! I want to conduct the Wilcoxon rank-sum test on two datasets, i.e., x1 and x2. My code is as follows, from scipy import stats x1 = [9,5,8,7,10,6,7] # len(x1) = 7 x2 = [7,4,5,6,3,6,4,4] # len(x2) = 8 stats.mannwhitneyu(x1, x2) Then I get the…
Yongfeng
  • 345
  • 1
  • 3
  • 15
0
votes
0 answers

How to try different effect sizes for Fisher's exact test?

I am currently working on a simulation, and I would like to see what happens if the effect size is different. How would I test out different effect sizes for the Fisher's exact test with my current code? # p1<-response in controls #…
h09812349
  • 109
  • 6
0
votes
1 answer

Find a parallel a t-test for means and a test for slope=0 t-test

So picture these two groups of females and males ages: femalesage<-c(30,52,59,25,26,72,46,32,64,45) malesage<-c(40,56,31,63,63,78,42,45,67) I can easily do a t.test(females age,malesage) to achieve the following result: …
0
votes
1 answer

t testing total plays of users by gender - python

I want to assess the statistical difference of male and female users group by each of their total plays (see below example): Example of female entries female users artist plays gender age 0 48591 sting 12763 f 25.0 1 48591…
Mr. Jibz
  • 511
  • 2
  • 7
  • 21
0
votes
1 answer

Likelihood Ratio Test in R for hypothesis testing

I am trying to compute the log likelihood ratio test in R, but am having some difficulties. For some reason I keep getting a negative log likelihood value which isn't possible I do not know the reason. This is the data I am using. Here is the code…
mrsquid
  • 605
  • 2
  • 9
  • 24
0
votes
0 answers

How to get confidence interval for hypothesis test of non-linear multiple parameters

I am trying to do something that seems very simple yet I cannot find any good advice out there. I would like to get the confidence interval for the non-linear combination of two coefficients in a regression model. I cam use linearHypothesis() to…
0
votes
1 answer

How to pass different DataType values in hypothesis and how to check return type and value is correct in Python

Doing sample code for Unit Test in Python with Hypothesis module. Wrote simple getTimeDelta function to get time difference between two dates. Want to write Unit Test of the getTimeDelta function. Used hypothesis modules to get multiple datetime…
Vivek Sable
  • 9,938
  • 3
  • 40
  • 56
0
votes
1 answer

Why the hypothesis has to introduce two parameters, namely θ0 and θ1

I was learning Machine Learning from this course on Coursera taught by Andrew Ng. The instructor defines the hypothesis as a linear function of the "input" (x, in my case) like the following: hθ(x) = θ0 + θ1(x) In supervised learning, we have some…
0
votes
0 answers

R Chi Squared Test Prep

Im looking to confirm that I have my Chi Square test set up correctly. I have 2 variables with 1 observation, which is the count of tweets per each. Im just trying to confirm I have it set up correctly.…
J. McCraiton
  • 159
  • 1
  • 2
  • 10
0
votes
0 answers

For what sample mean would the p-value be equal to 0.05

It's a homework question. I am not looking for exact answer but need a direction. I have following question H0: µ = 30 HA: µ != 30 We know that the sample standard deviation is 10 and the sample size is 70. For what sample mean would the p-value…
mc29
  • 85
  • 2
  • 10
0
votes
1 answer

Running T.Test in R comparing two different columns

I have to run a t.test in R on the following: If the YearsAtCompany of Single is less than Married Meaning somehow I need to compare the YearsatCompany with Marital Status I have…
TeaCup
  • 53
  • 1
  • 1
  • 7
0
votes
4 answers

How to do Wilcoxon test on columns between two dataframes

I have two dataframes: D9 <- as.data.frame(DF$As,DF$Cd,DF$Cu,DF$Cr,DF$Ni,DF$Pb,DF$Zn) D10 <- as.data.frame(DO$As,DO$Cd,DO$Cu,DO$Cr,DO$Ni,DO$Pb,DO$Zn) And want to apply wilcox test on each columns (DF$As,DO$As) and so on. I tried the following…
Ib Nemer
  • 85
  • 1
  • 6