Statistics finding p value from frozen dinners

59 Views Asked by At

enter image description here

For this question, for test statistic $\frac{(sample\ mean - population\ mean)}{ (\frac{sample\ standard\ deviation} {\sqrt n})}$

$\frac{200.75 - 200}{(\frac{8.2586}{ \sqrt 12})}$

I have gotten $0.314590392$ for the test statistic

By using the free software from https://www.r-project.org/

I have inputted the following using the r software

$pt(0.314590392,11)$ where $11$ is $n - 1 (12-1)$ for $t$ distribution

$p$ value of the test in $(a)-(b)$ is $0.6205204$

Are these the correct answers for this question

1

There are 1 best solutions below

1
On BEST ANSWER

It seems you are testing $H_0: \mu = 200$ against the two-sided alternative $H_a: \mu \ne 200.$ The null distribution of the $T$-statistic is Student's t distribution with 11 degrees of freedom, and you have computed the observed value of the $T$-statistic to be $T = .3146.$ Consider the PDF of $\mathsf{T}(11)$ plotted below.

enter image description here

For this two-sided test, the total P-value is the sum of the two areas outside the vertical red lines. The solid red line is the observed value of the t-statistic, but the dotted red line is at a value just as extreme (far from $0$) in the opposite direction.

I'm glad to see you are using R. It is excellent software. The R code you need in order to finish is one of the following two statements:

2*pt(-.3146, 11)
## 0.7589521
pt(-.3146,11) + (1 - pt(.3146,11))
## 0.7589521

Bear in mind that pt is the CDF of the t distribution.


Finally, because you have R, I will show you how to use it to do the test from scratch:

x = c(204, 202, 213, 198, 189, 200, 213, 206, 188, 193, 206, 197)
t.test(x, mu = 200)

        One Sample t-test

data:  x 
t = 0.3146, df = 11, p-value = 0.759
alternative hypothesis: true mean is not equal to 200 
95 percent confidence interval:
195.5027 205.9973 
sample estimates:
mean of x 
   200.75