Cofidece Itervals QMET103 Library, Teachig ad Learig
CONFIDENCE INTERVALS provide a iterval estimate of the ukow populatio parameter. What is a cofidece iterval? Statisticias have a habit of hedgig their bets. They always isert qualifiers ito reports, war about all sorts of assumptios, ad ever admit to aythig more extreme tha probable. There's a famous sayig: "Statistics meas ever havig to say you're certai." Statemets must be qualified, of course, because we are always dealig with imperfect iformatio. I particular, it is ofte ecessary to make statemets about a populatio usig iformatio from a sample. No matter how carefully this sample is selected to be a fair ad ubiased represetatio of the populatio, relyig o iformatio from a sample will always lead to some level of ucertaity. So, a cofidece iterval is a iterval withi which we ca estimate, with some cofidece, that the true populatio parameter will lie. Itroductio Suppose we were iterested i aswerig a simple research questio such as: "What is the mea umber of digits that ca be remembered?" Havig specified the populatio of people to be: Licol Uiversity studets, we take a sample of 10. The umber of digits remembered for these 10 studets is: 4, 4, 5, 5, 5, 6, 6, 7, 8, 9. From these results we fid the estimated value of, that is x, to be 5.9 ad s 1. 66. But this will certaily ot be a perfect estimate. It is boud to be at least either a little too high or a little too low. For the estimate of to be of value, we eed to have some idea of how precise it is. That is, how close to is the estimate likely to be? A excellet way to specify the precisio is to costruct a cofidece iterval. Sice we kow that approximately 68% of a distributio lies withi 1 s.d. of the mea, we could say that we are 68% certai that the populatio mea lies withi a iterval of x 1s.d. That is, we could be about 68% cofidet that the true mea umber of digits that ca be remembered lies betwee 5.9 1. 66 or betwee 4.24 ad 7.56. Ad, sice we kow that approximately 95% of a distributio lies withi 2 s.d. of the mea, we could say that we are about 95% certai that the populatio mea lies withi a iterval of x 2s.d. or betwee 5.9 21. 66 i.e. betwee 0.92 ad 10.88. Similarly if approximately 99% of a distributio lies withi 3 s.d. of the mea, we could say that we are about 99% certai that the populatio mea lies withi a iterval of x 3s.d. or betwee 5.9 31. 66 i.e. betwee 4.24 ad 7.56. Iterpretatio: A 95% cofidece iterval estimate meas that if all possible samples are take, 95% of them would iclude the true populatio mea somewhere i their iterval. Or we ca be 95% cofidet the iterval cotais the true populatio mea. (Other cofidece itervals used more frequetly are 90% CI or 99% CI). 2
How is it calculated? The formula for a cofidece iterval is sample statistic Z s.e.( populatio parameter) score or sample statistic t s.e.( sample statistic) score Each situatio eeds careful cosideratio, ad the followig decisios made: Is the sample statistic a mea or proportio? Is there oe sample or two? What is the stadard error (s.e.) of the sample statistic? Should a t or a Z score be used? A flow diagram may help to see the process. (see later) Notice: The formula cosists of three parts, separated by ad. I all s, the expressio after the -sig is the stadard error. That is, you are give a sample mea ad the populatio stadard deviatio or variace. Use x Z score 1. From the sample, calculate x or ote it if is give. 2. Look up a Z score from the stadard table (*see below). Note the level of cofidece required. 2 or kow 3. Calculate the stadard error of the sample statistic. For a mea, the s.e. is Example: For a set of data, x 85,,ad, fid a 95% x 85 Z score : 95% 095. ; 095. 2 0. 475; 05. 0. 475 0. 975 s. z.00.01.02.03.04.05.06.07.08.09 0.0 1.9 0.9713.9719.9726.9732.9738.9744.9750.9756.9761.9767 That is, Z 1. 96 Hece x Z 85 1. 96 score 74. 26, 95. 74 Iterpretatio: We ca be 95% cofidet the true populatio mea lies betwee 74.26 ad 96.74. Note o use of calculator: The i the formula meas you must do two calculatios. Use the replay key o your calculator for this. Calculate the lower value i the, usig the mius ( - ) key The, with the right had > (which takes you to the begiig of the calculatio) scroll across util the cursor is over the ( ). Chage to + ad press =. You ow have the upper value of the iterval. 3
2 If the oly iformatio give is mea ad sample stadard deviatio orvariace, ukow a t score is used istead of a Z score x t 1 Use - 1. From the sample, calculate x. (This may be give to you.) s 2. Calculate the degrees of freedom. For a oe sample mea, this is 1. 4. Look up a t score from the t- table (*see below). Note level of cofidece required ad use the correct degrees of freedom (df). 5. Calculate the stadard error of the sample statistic. s se. For a oe sample mea, mea Example: For a set of data, x, s,ad, se ( mea) degrees of freedom 1 29 85 fid a 95% ad 95% upper tail = 0.025. So from table: t score : df t.100 t.050 t.025 t.010 t.005 t.001 t.005.. 29 1.311 1.699 2.045 2.462 2.756 3.396 3.659 Hece, the = That is, t.025 = 2.045. 85 2.045 =(73.7934, 96.2006) That is, we ca be 95% cofidet that the true populatio mea lies betwee approximately 73.79 ad 96.20. Note that this iterval is oly slightly greater tha the oe calculated previously usig populatio s.d ad a Z score. 4
Practise Questios oe sample 1. A machie maufactures bolts to a set legth with variace of 6.25 mm. A radom sample of 20 bolts is checked ad foud to have a mea legth of 75.2 mm. Fid the 99% cofidece iterval for the mea legth of the bolts. 2. 60 people were asked to measure their pulse rates after completig a 3 km ru. The mea was 105 beats ad the stadard deviatio was 8 beats. Costruct a 95% cofidece iterval for the mea of the populatio of people. 3. A type of golf ball is tested, by droppig it oto a hard surface from a height of 1 metre. The height it bouces is kow to be ormally distributed with a stadard deviatio of 3.6 cm. If a sample of 100 balls are tested ad the mea height of the bouces is 82 cm, fid a. 90% b. 95% c. 99% cofidece itervals for the mea of the bouce of the golf ball. 4. A sample of stalactites (a type of rock formatio) foud i a glow worm cave produced the followig legths i cm: 9.6 16.9 15.1 14.3 15.9 17.2 13.0 17.1 15.4 16.2 4.5 20.3 21.2 15.7 Assumig that this sample came from a ormal populatio, calculate a 95% cofidece iterval for the mea legth of stalactites i the cave. 5. A doctor coducts a small survey with a radom sample of his patiets, measurig their cholesterol levels. Here is his data (the measuremets are i m.mol/l): 3.6 6.9 5.1 4.2 5.5 7.2 3.0 5.8 4.9 9.9 7.1 5.4 6.2 4.5 6.3 8.2 5.7 4.4 7.9 3.2 Fid a 80% cofidece iterval for the mea cholesterol level of his patiets. 6. A major departmet store chai is iterested i estimatio the average amout its credit card users spet o their first visit to the chai s ew store. Fiftee credit cards were radomly sampled ad aalysed to show a mea of $50.50 ad variace 400. Costruct a 95% cofidet iterval for the average amout its credit card users spet o their first visit to the chai s ew store assumig that the amout spet follows a ormal distributio. 7. A race car driver tested his car for the time he takes to accelerate from 0 to 60 km/hr. I 20 such tests he obtaied a average of 4.85 secods with a stadard deviatio of 1.47 secods. What is a 95% cofidece iterval for the acceleratio time? 8. The actual voltages of power packs labelled as 12 volts are as follows: 11.77, 11.90, 11.64, 11.84, 12.13, 11.99, ad 11.77. Calculate a 99% cofidece iterval for the true voltage i these packs. Whe readig a questio, ote: Has the variace, stadard deviatio or stadard error bee give? Adjust your formula to match what has bee give. Is the iformatio from the populatio or the sample? Remember to use a Z score if it is from the populatio ad t score for a sample. 5
p 1 p Use p Z score 1. From the sample, calculate p or ote if give. 2. Look up a Z score from the stadard table (*see below). Note the level of cofidece required. 3. Calculate the stadard error of the sample statistic. For a proportio, the s.e. is p1 p Example: I a Rugby World Cup, a radom sample of supporters were asked, Which coutry do you thik will wi the 2003 Rugby World Cup? The results are summarised: Coutry Number of supporters who thik their coutry will wi Australia 116 Eglad 13 Frace 25 New Zealad 140 Wester Samoa 50 South Africa 47 Wales 24 Udecided 65 Total 480 Calculate a 90% cofidece Iterval for the proportio who had ot yet decided. Solutio: ot decided 65 480 p ; 90% cofidece Z = 1.645 65 480 1.645 ( 65 480 We ca be 90% cofidet betwee 11% ad 16% of the populatio were udecided. (If you chage the fractios to decimals, there will be a slight roudig error, but this will usually ot be greatly sigificat.) Practice Questios 1. Samples of size are take from populatios with a probability of success p. Use the values of ad p, the sample size ad proportio, give below, to fid cofidece itervals for the populatio proportio with the levels of cofidece idicated. p Cofidece Level a 60 0.54 99% b 200 0.4 90% c 1000 0.45 86%. ) 480 415 480 0.110, 0.161 6
2. A political cadidate fids that i a radom sample of 0 costituets, 34% support her party. Fid the 95% cofidece iterval for the support she i fact has. 3. Houses o a street are umbered from 1 to 627. Roimata takes a radom sample of 40 houses. She fids that i 25 of them, there are more tha 3 residets. Fid a 90% cofidece iterval for the proportio of all houses i the street havig more tha three residets. 4 A toy maufacturer wats to test for the proportio of faulty toys i a large batch produced by a particular factory. He tests a radom sample of 200 toys ad fids that 25 are faulty. Calculate a 94% cofidece iterval for the proportio of faulty toys i the complete batch. 5. I a survey carried out i Aucklad, 38 people out of a radom sample of 70 people said that they bought the New Zealad Herald regularly. Fid a 99% cofidece iterval for the proportio of people who buy the Herald i Aucklad. Aswers (mea) 1 Populatio variace give, so use Z score, ad calculate stadard dev. 2 6.25 2.5 99% Z 2. 58 2.5 Hece 75.2 2.58 73.75, 76.64. 20 2 Sample stadard deviatio give so use t score 8 105 2.009 102.9,107.1 60 3. Populatio std.dev. give, so use Z score. (a) 90% 1. 645 3.6 Z 82 1.645 81.4, 82. 6 (b) 95% 1. 96 100 3.6 82 1.96 81.3, 82. 7 100 3.6 82 2.58 81.07, 82. 93 100 x 15.17, s 4. 4.17 15.17 2.16 12.76,17.58 14 x 5.75, s 1. 1.768 5.75 1.328 5.22, 6.28 20 Z (c) 99% 2. 58 Z 4. Calculate sample mea ad s.d.: 17 95% df 13 t 2.16 ad 5. Calculate sample mea ad s.d.: 768 6. 80% df 19 t 1.328 ad x 50. 5,s 400 20, 15 df 14, p 0. 025 t 2. 1448 20 50. 5 2. 1448 39. 42, 61. 58 15 That is, we ca be 95% cofidet, credit card users spet o average betwee $40 ad $62. 7
7. x 4. 85, s 1. 47 20 d.f. 19, p 0. 025 t 2. 093 1. 47 4. 85 2. 093 4. 16, 5. 54 20 That is, we ca be 95%cofidet that the true acceleratio time is betwee 4.16 ad 5.54 secods. 8. x 11. 86,s 0. 1614 (after eterig data i calculator). That is we ca be 99% cofidet that the true voltage i the power packs is betwee 11.63 ad 12.09 volts. Aswers (proportio) 0.54 0.46 60 1. a 0.54 2.58 0.37, 0.71 0.4 0.6 200 b. C. 0.4 1.645 0.34,0.46 0.45 0.55 1000 p 0.34, 95% Z 1. 96 c. 0.45 1.48 0.43, 0.47 2. 0, 7 df 6, p 0. 005 t 3. 7074 0. 1614 11. 86 3. 7074 11. 63, 12. 09 7 0.34 1.96 0.34 0.66 0 0.29, 0.39 25 3 40, p 0. 625 90% Z 1. 645 40 0.625 1.645 0.625 0.375 40 0.125 0.875 200 0.499, 0.751 4. 0.125 1.88 0.081, 0.169 38 10 70 5. 2.58 0.389, 0.696 70 38 70 32 8
To fid a z-score (Usig Z table with upper half shadig oly) Probability Table etry is probability at or below z Z.00.01.02.03.04 0.05 0.06 0.07 0.08 0.09 0.0 0.1 0.2..... 2.3.4893.4896.4898.4901.4904.4906.4909.4911.4913.4916 etc To locate the appropriate Z-score For example, to fid the correct Z-score for a 98% cofidece iterval: Chage the %age to a decimal 98% = 0.98 Halve this decimal 0.98/2 = 0.49 Fid this value i the table Closest value =.4901 Use the correspodig Z-score Z-score = 2.33 To fid a z-score (Usig Z table with left had tail shaded) Probability Table etry is probability at or below z Z.00.01.02.03.04 0.05 0.06 0.07 0.08 0.09 0.0 0.1 0.2..... 2.3.9893.9896.9898.9901.9904.9906.9909.9911.9913.9916 etc To locate the appropriate Z-score For example, to fid the correct Z-score for a 98% cofidece iterval: Chage the %age to a decimal 98% = 0.98 Halve this decimal 0.98/2 = 0.49 Add 0.5 0.49 + 0.5 = 0.99 Fid this value i the table Use the correspodig Z-score Closest value =.9901 9 Z-score = 2.33
10