3) Let's examine the levels of levels of sodium in the blood. 20 people yield the following results (in mEq/L): ̄y = 136.95 s = 2.544 (a) Test H0: μ = 140 using α = 0.001 (that's not a typo). (b) Figure out the p-value. To do this, take the t value that you calculated in (a) and use R: pt(absolute-value-of-your-t*, df, lower.tail = FALSE)*2 Since it's a two-sided test, you need to multiply by 2 at the end. We'll talk more about this in lecture when we do one sided tests; for now just realize that without the “*2” at the end R gives you a one sided p-value. For example, if your t* = 4.65 and you have 67 degrees of freedom you would do: pt(4.65,67,lower.tail = FALSE)*2 and you would get back 1.609352e-05
3) Let's examine the levels of levels of sodium in the blood. 20 people yield the following results (in mEq/L): ̄y = 136.95 s = 2.544
(a) Test H0: μ = 140 using α = 0.001 (that's not a typo).
(b) Figure out the p-value. To do this, take the t value that you calculated in (a) and use R:
pt(absolute-value-of-your-t*, df, lower.tail = FALSE)*2
Since it's a two-sided test, you need to multiply by 2 at the end. We'll talk more about this in lecture when we do one sided tests; for now just realize that without the “*2” at the end R gives you a one sided p-value.
For example, if your t* = 4.65 and you have 67 degrees of freedom you would do: pt(4.65,67,lower.tail = FALSE)*2
and you would get back 1.609352e-05
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images