1-sample t-test null hypothesis p-values problem

45 Views Asked by At

Q-Average teacher salary in the USA is 39250 dollar. (All numbers are artificial.) Researcher randomly choosed 25 teachers from California and found that their average salary is 1900 dollar above the country average with standard sample deviation equal to 5000. Can we conclude that teachers in California has higher salary than average in USA? First of all, let us find p-value

Ans:t-statistics = ((1900 - 39250))/5000/sqrt(25)

= -37.35

t critical value = 1.711

t-statistics < t critical value

so

scipy.stats.t.cdf(-37.35,df=24)

= 4.4500251881150287e-23

so i confuse the p-value what should be or my method of calculation p-value is wrong or not How to get p-value?

1

There are 1 best solutions below

0
On

The problem states that in the sample of $25$ teachers from California, the average salary is higher by $1900$ dollars. In other words, the sample mean is $39250 + 1900 = 41150$. What you calculated in your work suggests that the sample mean of these teachers is $1900$; i.e. on average those $25$ teachers had an annual salary of $1900$. That is why your computation looks so strange.

Instead, the value of the test statistic should be $$T = \frac{\bar x - \mu_0}{s/\sqrt{n}} = \frac{41150 - 39250}{5000/\sqrt{25}} = \frac{1900}{1000} = 1.9.$$ This is Student $t$ distributed with $n-1 = 24$ degrees of freedom.