t and F distribution notes
t and F distribution notes t and F distribution notes
Ch. 4 χ 2 , t, and F • Summary of Theoretical Background • Examples (involving one sample): 1. Confidence interval for µ using the t distribution 2. A test for µ using the F distribution 1
- Page 2 and 3: Summary of Theoretical Background
- Page 4 and 5: • The density of the t distributi
- Page 6 and 7: Example: Confidence interval for µ
- Page 8: Example: Testing µ (using the F di
Ch. 4 χ 2 , t, <strong>and</strong> F<br />
• Summary of Theoretical Background<br />
• Examples (involving one sample):<br />
1. Confidence interval for µ using the t <strong>distribution</strong><br />
2. A test for µ using the F <strong>distribution</strong><br />
1
Summary of Theoretical Background<br />
• X 1 , X 2 , . . . , X n is a r<strong>and</strong>om sample from a normal population with<br />
mean or expected value µ <strong>and</strong> variance σ 2 .<br />
• S 2 is the sample variance <strong>and</strong> ¯X is the sample mean.<br />
• (n − 1)S 2 /σ 2 is a χ 2 (n−1)<br />
r<strong>and</strong>om variable.<br />
• If Z is st<strong>and</strong>ard normal <strong>and</strong> X is χ 2 , <strong>and</strong> Z <strong>and</strong> X are independent,<br />
(ν)<br />
then T = √ Z is a t r<strong>and</strong>om variable on ν degrees of freedom.<br />
X/ν<br />
• If X 1 ∼ χ 2 ν 1<br />
<strong>and</strong> X 2 ∼ χ 2 ν 2<br />
, <strong>and</strong> X 1 <strong>and</strong> X 2 are independent, then<br />
F = X 1/ν 1<br />
X 2 /ν 2<br />
has an F <strong>distribution</strong> on ν 1 <strong>and</strong> ν 2 degrees of freedom.<br />
2
A t R<strong>and</strong>om Variable<br />
• If X 1 , X 2 , . . . , X n are independent normal measurements with mean<br />
µ <strong>and</strong> variance σ 2 , then<br />
is st<strong>and</strong>ard normal.<br />
Z = ¯X − µ<br />
σ/ √ n<br />
• We estimate σ with S:<br />
is not st<strong>and</strong>ard normal.<br />
T = ¯X − µ<br />
S/ √ n<br />
• T has a t <strong>distribution</strong> on n − 1 degrees of freedom.<br />
• The number of degrees of freedom = denominator of S 2 .<br />
3
• The density of the t <strong>distribution</strong> is bell-shaped like the normal, but it is<br />
flatter <strong>and</strong> more spread out.<br />
• As the number of degrees of freedom increases, a t r<strong>and</strong>om variable<br />
becomes more <strong>and</strong> more like a st<strong>and</strong>ard normal r<strong>and</strong>om variable:<br />
t n−1 → z as n increases
Percentiles of the t <strong>distribution</strong><br />
• Given in a table at the back of the textbook.<br />
• Or use qt(1-a, df)<br />
• Example. Find the value of t .025,7 .<br />
Look at the 7th row <strong>and</strong> 5th column: t .025,7 = 2.365. or<br />
qt(.975, 7); [1] 2.364624<br />
• Example. Find the value of t .025,∞ .<br />
Look at the bottom row <strong>and</strong> 3rd column: t .025,∞ = z .025 = 1.96.<br />
4
Example: Confidence interval for µ<br />
• Find a 95% confidence interval for the expected value of<br />
concentration measurements taken from a chemical process. Sample<br />
measurements are<br />
204 190 202 207<br />
204 202 201 195<br />
• If X de<strong>notes</strong> a concentration measurement, then ¯x = 201.,<br />
s = 5.50, <strong>and</strong> n = 8 so a 95% confidence interval for µ = E[X] is<br />
¯x ± t .025,7<br />
s<br />
√<br />
8<br />
= 201 ± 2.365(5.5)/ √ 8<br />
= 201 ± 4.60<br />
5
The F <strong>distribution</strong><br />
• Recall that Z 2 is χ 2 (1) <strong>and</strong> (n − 1)S2 /σ 2 is χ 2 (n−1) , <strong>and</strong> S2 <strong>and</strong> ¯X<br />
are independent, if the underlying sample is r<strong>and</strong>om <strong>and</strong> normal with<br />
mean µ <strong>and</strong> variance σ 2 .<br />
• Therefore,<br />
( ¯X − µ) 2<br />
S 2 /n<br />
has an F <strong>distribution</strong> on 1 <strong>and</strong> n − 1 degrees of freedom.<br />
• Percentiles of the F <strong>distribution</strong> can be read from the F tables at the<br />
back of the book or use qf(1-a, n1, n2)<br />
• e.g. f .95,1,7 = 5.59 or qf(.95, 1, 7); [1] 5.591448<br />
6
Example: Testing µ (using the F <strong>distribution</strong>)<br />
• Is the expected value of the concentration measurements different<br />
from 207?<br />
• We test this by contradiction:<br />
Suppose µ = 207. Then<br />
f =<br />
(¯x − µ)2<br />
s 2 /n<br />
=<br />
(201 − 207)2<br />
5.5 2 /8<br />
= 9.52<br />
Conclusion: This value exceeds 5.59, so the probability of observing<br />
an f value this large, under our assumption (called the Null<br />
Hypothesis) is less than .05. We have evidence that the true<br />
expected concentration differs from 207.<br />
7