STA 291 Lecture 19 Exam II Next Tuesday 5-7pm Memorial Hall (Same place as exam I) Makeup Exam 7:15pm 9:15pm Locatio CB 234 STA 291 - Lecture 19 1 Exam II Covers Chapter 9 10.1; 10.2; 10.3; 10.4; 10.6 12.1; 12.2; 12.3; 12.4 Formula sheet; ormal table; t-table will be provided. STA 291 - Lecture 19 2 Cofidece Iterval A cofidece iterval for a ukow parameter is a rage of umbers that is likely to cover (or capture) the true parameter. (for us, parameter is either p or mu) The probability that the cofidece iterval captures the true parameter is called the cofidece level. The cofidece level is a chose umber close to 1, usually 95%, 90% or 99% STA 291 - Lecture 19 3 1
Why ot chose cofidece level 100%? STA 291 - Lecture 19 4 Cofidece iterval for mu For cotiuous type data, ofte the parameter is the populatio mea, mu. Chap. 12.1 12.4 STA 291 - Lecture 19 5 Chap. 12.1 12.4: Cofidece Iterval for mu The radom iterval betwee X 1.96 ad X + 1.96 Will capture the populatio mea, mu, with 95% probability This is a cofidece statemet, ad the iterval is called a 95% cofidece iterval We eed to kow sigma. STA 291 - Lecture 19 6 2
cofidece level 0.90, z =1.645 α /2 cofidece level 0.95 z α /2 =1.96 cofidece level 0.99 z α /2 =2.575 Where do these umbers come from? (same umber as the cofidece iterval for p). They are from ormal table/web STA 291 - Lecture 19 7 Studet t - adjustmet If sigma is ukow, (ofte the case) we may replace it by s (the sample SD) but the value Z (for example z=1.96) eeds adjustmet to take ito accout of extra variability itroduced by s There is aother table to look up: t-table or aother applet http://www.socr.ucla.edu/applets.dir/normal_t_chi2_f_tables.htm STA 291 - Lecture 19 8 William Gosset studet for the t- table works for Guiess Brewery 103 years ago STA 291 - Lecture 19 9 3
Degrees of freedom, -1 Studet t - table is keyed by the df degrees of freedom Etries with ifiite degrees of freedom is same as Normal table Whe degrees of freedom is over 200, the differece to ormal is very small STA 291 - Lecture 19 10 With the t-adjustmet, we do ot require a large sample size. Sample size ca be 25, 18 or 100 etc. STA 291 - Lecture 19 11 STA 291 - Lecture 19 12 4
STA 291 - Lecture 19 13 Cofidece Itervals Cofidece Iterval Applet http://bcs.whfreema.com/scc/cotet/cat_040/spt/cofidece/cofideceiterval.html STA 291 - Lecture 19 14 Example: Cofidece Iterval Example: Fid ad iterpret the 95% cofidece iterval for the populatio mea, if the sample mea is 70 ad the pop. stadard deviatio is 12, based o a sample of size = 100 First we compute =12/10= 1.2, 1.96x 1.2=2.352 [ 70 2.352, 70 + 2.352 ] = [ 67.648, 72.352] STA 291 - Lecture 19 15 5
Example: Cofidece Iterval Now suppose the pop. stadard deviatio is ukow (ofte the case). Based o a sample of size = 100, Suppose we also compute the s = 12.6 (i additio to sample mea = 70) First we compute =12.6/10= 1.26, s From t-table 1.984 x 1.26 = 2.4998 [ 70 2.4998, 70 + 2.4998 ] = [ 67.5002, 72.4998] STA 291 - Lecture 19 16 Cofidece Iterval: Iterpretatio Probability meas that i the log ru, 95% of these itervals would cotai the parameter i.e. If we repeatedly took radom samples usig the same method, the, i the log ru, i 95% of the cases, the cofidece iterval will cover the true ukow parameter For oe give sample, we do ot kow whether the cofidece iterval covers the true parameter or ot. (uless you kow the parameter) The 95% probability oly refers to the method that we use, but ot to the idividual sample STA 291 - Lecture 19 17 Cofidece Iterval: Iterpretatio To avoid the misleadig word probability, we say: We are 95% cofidet that the iterval will cotai the true populatio mea Wrog statemet: With 95% probability, the populatio mea is i the iterval from 3.5 to 5.2 Wrog statemet: 95% of all the future observatios will fall withi 3.5 to 5.2. STA 291 - Lecture 19 18 6
Cofidece Iterval If we chage the cofidece level from 0.95 to 0.99, the cofidece iterval chages Icreasig the probability that the iterval cotais the true parameter requires icreasig the legth of the iterval I order to achieve 100% probability to cover the true parameter, we would have to icrease the legth of the iterval to ifiite -- that would ot be iformative, ot useful. There is a tradeoff betwee legth of cofidece iterval ad coverage probability. Ideally, we wat short legth ad high coverage probability (high cofidece level). STA 291 - Lecture 19 19 Differet Cofidece Coefficiets I geeral, a cofidece iterval for the mea, µ has the form X± z Where z is chose such that the probability uder a ormal curve withi z stadard deviatios equals the cofidece level STA 291 - Lecture 19 20 Differet Cofidece Coefficiets We ca use ormal Table to costruct cofidece itervals for other cofidece levels For example, there is 99% probability of a ormal distributio withi 2.575 stadard deviatios of the mea A 99% cofidece iterval for X ± 2.575 is STA 291 - Lecture 19 21 µ 7
Error Probability The error probability (a) is the probability that a cofidece iterval does ot cotai the populatio parameter -- (missig the target) For a 95% cofidece iterval, the error probability a=0.05 a = 1 - cofidece level or cofidece level = 1 a STA 291 - Lecture 19 22 Differet Cofidece Levels Cofidece level 90% 0.1 Error a a/2 z 95% 0.05 0.025 1.96 98% 99% 2.575 99.74% 3 1.5 STA 291 - Lecture 19 23 If a 95% cofidece iterval for the populatio mea, turs out to be [ 67.4, 73.6] What will be the cofidece level of the iterval [ 67.8, 73.2]? STA 291 - Lecture 19 24 8
Iterpretatio of Cofidece Iterval If you calculated a 95% cofidece iterval, say from 10 to 14, The true parameter is either i the iterval from 10 to 14, or ot we just do t kow it (uless we kew the parameter). The 95% probability refers to probability before we do it: (before Joe shoot the free throw, I say he has 77% hittig the hoop. But after he did it, he either hit it or missed it). STA 291 - Lecture 19 25 Iterpretatio of Cofidece Iterval, II If you repeatedly calculate cofidece itervals with the same method, the 95% of them will cotai the true parameter, -- (usig the log ru average iterpretatio of the probability.) STA 291 - Lecture 19 26 Choice of sample size I order to achieve a margi of error smaller tha B, (with cofidece level 95%), how large the sample size must we get? STA 291 - Lecture 19 27 9
Choice of Sample Size X ± z = X ± B So far, we have calculated cofidece itervals startig with z, ad These three umbers determie the error boud B of the cofidece iterval Now we reverse the equatio: We specify a desired error boud B Give z ad, we ca fid the miimal sample size eeded for achieve this. STA 291 - Lecture 19 28 Choice of Sample Size From last page, we have z = B Mathematically, we eed to solve the above equatio for The result is 2 = B 2 z STA 291 - Lecture 19 29 Example About how large a sample would have bee adequate if we merely eeded to estimate the mea to withi 0.5, with 95% cofidece? (assume = 5 B=0.5, z=1.96 Plug ito the formula: 2 1.96 = 5 =384.16 0.5 2 STA 291 - Lecture 19 30 10
Choice of sample size The most lazy way to do it is to guess a sample size ad Compute B, if B ot small eough, the icrease ; If B too small, the decrease STA 291 - Lecture 19 31 For the cofidece iterval for p p(1 p) z = B Ofte, we eed to put i a rough guess of p (called pilot value). Or, coservatively put p=0.5 STA 291 - Lecture 19 32 Suppose we wat a 95%cofidece error boud B=3% (margi of error + - 3%). Suppose we do ot have a pilot p value, so use p = 0.5 So, = 0.5(1-0.5) [ 1.96/0.03]^2=1067.11 STA 291 - Lecture 19 33 11
Attedace Survey Questio O a 4 x6 idex card Please write dow your ame ad sectio umber Today s Questio: Which t-table you like better? STA 291 - Lecture 19 34 Facts About Cofidece Itervals I The width of a cofidece iterval Icreases as the cofidece level icreases Icreases as the error probability decreases Icreases as the stadard error icreases Decreases as the sample size icreases STA 291 - Lecture 19 35 www.webchem.sci.ru.l/stat/idex.html Try to teach us cofidece iterval but the iterpretatio is all wrog For Beroulli type data, the future observatios NEVER fall ito the cofidece iterval STA 291 - Lecture 19 36 12