Iferece for Proportios Iferece for a Sigle Proportio IPS Chapter 8. 009 W.H. Freema ad Compay
Objectives (IPS Chapter 8.) Iferece for a sigle proportio Large-sample cofidece iterval for p Plus four cofidece iterval for p Sigificace test for a sigle proportio Choosig a sample size
Samplig distributio of sample proportio The samplig distributio of a sample proportio is approximately ormal (ormal approximatio of a biomial distributio) whe the sample size is large eough.
Coditios for iferece o p Assumptios:. The data used for the estimate are a SRS from the populatio studied.. The populatio is at least 0 times as large as the sample used for iferece. This esures that the stadard deviatio of is close to p( p) 3. The sample size is large eough that the samplig distributio ca be approximated with a ormal distributio. How large a sample size is required depeds i part o the value of p ad the test coducted. Otherwise, rely o the biomial distributio.
Large-sample cofidece iterval for p Cofidece itervals cotai the populatio proportio p i C% of samples. For a SRS of size draw from a large populatio, ad with sample proportio calculated from the data, a approximate level C cofidece iterval for p is: ± m, m is the margi of error m z * SE z * ( ) C Use this method whe the umber of successes ad the umber of failures are both at least 5. m m Z* Z* C is the area uder the stadard ormal curve betwee z* ad z*.
Medicatio side effects Arthritis is a paiful, chroic iflammatio of the joits. A experimet o the side effects of pai relievers examied arthritis patiets to fid the proportio of patiets who suffer side effects. What are some side effects of ibuprofe? Serious side effects (seek medical attetio immediately): Allergic reactio (difficulty breathig, swellig, or hives), Muscle cramps, umbess, or tiglig, Ulcers (ope sores) i the mouth, Rapid weight gai (fluid retetio), Seizures, Black, bloody, or tarry stools, Blood i your urie or vomit, Decreased hearig or rigig i the ears, Jaudice (yellowig of the ski or eyes), or Abdomial crampig, idigestio, or heartbur, Less serious side effects (discuss with your doctor): Dizziess or headache, Nausea, gaseousess, diarrhea, or costipatio, Depressio, Fatigue or weakess, Dry mouth, or Irregular mestrual periods
Let s calculate a 90% cofidece iterval for the populatio proportio of arthritis patiets who suffer some adverse symptoms. What is the sample proportio? 3 440 0.05 What is the samplig distributio for the proportio of arthritis patiets with adverse symptoms for samples of 440? For a 90% cofidece level, z*.645. Usig the large sample method, we calculate a margi of error m: N( p, p( p) ) Uppe r tail probability P 0.5 0. 0.5 0. 0.05 0.03 0.0 0.0 z* 0.67 0.84.036.8.645.960.054.36 50% 60% 70% 80% 90% 95% 96% 98% Cofide ce le ve l C m m z * ( ).645* 0.05( 0.05) / 440 90%CIfor p : p ˆ ± m or 0.05 ± 0.03 m.645*0.04 0.03 With a 90% cofidece level, betwee.9% ad 7.5% of arthritis patiets takig this pai medicatio experiece some adverse symptoms.
Because we have to use a estimate of p to compute the margi of error, cofidece itervals for a populatio proportio are ot very accurate. m z * ˆ p ( p ˆ ) Specifically, we ted to be icorrect more ofte tha the cofidece level would idicate. But there is o systematic amout (because it depeds o p). Use with cautio!
Plus four cofidece iterval for p A simple adjustmet produces more accurate cofidece itervals. We act as if we had four additioal observatios, two beig successes ad two beig failures. Thus, the ew sample size is 4, ad the cout of successes is X. The plus four estimate of p is: ~ p couts of successes cout of all observatios 4 Ad a approximate level C cofidece iterval is: CI : ~ p ± m, with m z * SE z * ~ p ( ~ p ) ( 4) Use this method whe C is at least 90% ad sample size is at least 0.
We ow use the plus four method to calculate the 90% cofidece iterval for the populatio proportio of arthritis patiets who suffer some adverse symptoms. What is the value of the plus four estimate of p? ~ 3 5 p 440 4 444 0.056 A approximate 90% cofidece iterval for p usig the plus four method is: m m m z * ~ p ( ~ p ) (.645* 0.056(.645*0.0 0.08 4) 0.056) / 444 90%CIfor or 0.056 ± p : ~ p ± m 0.08 With 90% cofidece level, betwee 3.8% ad 7.4% of arthritis patiets takig this pai medicatio experiece some adverse symptoms. Upper tail probability P 0.5 0. 0.5 0. 0.05 0.05 0.0 0.0 0.005 0.003 0.00 0.0005 z* 0.674 0.84.036.8.645.960.054.36.576.807 3.09 3.9 50% 60% 70% 80% 90% 95% 96% 98% 99% 99.5% 99.8% 99.9% Cofidece level C
Sigificace test for p The samplig distributio for is approximately ormal for large sample sizes ad its shape depeds solely o p ad. Thus, we ca easily test the ull hypothesis: H 0 : p p 0 (a give value we are testig). If H 0 is true, the samplig distributio is kow p 0 ( p 0 ) The likelihood of our sample proportio give the ull hypothesis depeds o how far from p 0 our is i uits of stadard deviatio. z p ˆ p 0 p 0 ( p 0 ) ˆ p p 0 This is valid whe both expected couts expected successes p 0 ad expected failures ( p 0 ) are each 0 or larger.
P-values ad oe or two sided hypotheses remider Ad as always, if the p-value is as small or smaller tha the sigificace level α, the the differece is statistically sigificat ad we reject H 0.
A atioal survey by the Natioal Istitute for Occupatioal Safety ad Health o restaurat employees foud that 75% said that work stress had a egative impact o their persoal lives. You ivestigate a restaurat chai to see if the proportio of all their employees egatively affected by work stress differs from the atioal proportio p 0 0.75. H 0 : p p 0 0.75 vs. H a : p 0.75 ( sided alterative) I your SRS of 00 employees, you fid that 68 aswered Yes whe asked, Does work stress have a egative impact o your persoal life? The expected couts are 00 0.75 75 ad 5. Both are greater tha 0, so we ca use the z-test. The test statistic is:
From Table A we fid the area to the left of z.6 is 0.9474. Thus P(Z.6) 0.9474, or 0.056. Sice the alterative hypothesis is two-sided, the P-value is the area i both tails, ad P 0.056 0.05. The chai restaurat data are ot sigificatly differet from the atioal survey results ( 0.68, z.6, P 0.).
Software gives you summary data (sample size ad proportio) as well as the actual p-value. Miitab Cruch It!
Iterpretatio: magitude vs. reliability of effects The reliability of a iterpretatio is related to the stregth of the evidece. The smaller the p-value, the stroger the evidece agaist the ull hypothesis ad the more cofidet you ca be about your iterpretatio. The magitude or size of a effect relates to the real-life relevace of the pheomeo ucovered. The p-value does NOT assess the relevace of the effect, or its magitude. A cofidece iterval will assess the magitude of the effect. However, magitude is ot ecessarily equivalet to how theoretically or practically relevat a effect is.
Sample size for a desired margi of error You may eed to choose a sample size large eough to achieve a specified margi of error. However, because the samplig distributio of is a fuctio of the populatio proportio p, this process requires that you guess a likely value for p: p*. p ~ N z * m ( p, p( p) ) p *( p*) The margi of error will be less tha or equal to m if p* is chose to be 0.5. Remember, though, that sample size is ot always stretchable at will. There are typically costs ad costraits associated with large samples.
What sample size would we eed i order to achieve a margi of error o more tha 0.0 (%) for a 90% cofidece iterval for the populatio proportio of arthritis patiets who suffer some adverse symptoms. We could use 0.5 for our guessed p*. However, sice the drug has bee approved for sale over the couter, we ca safely assume that o more tha 0% of patiets should suffer adverse symptoms (a better guess tha 50%). For a 90% cofidece level, z*.645. Uppe r tail probability P 0.5 0. 0.5 0. 0.05 0.03 0.0 0.0 z* 0.67 0.84.036.8.645.960.054.36 50% 60% 70% 80% 90% 95% 96% 98% Cofide ce le ve l C z * p *( p*) m.645 0.0 (0.)(0.9) 434.4 To obtai a margi of error o more tha %, we would eed a sample size of at least 435 arthritis patiets.
Iferece for Proportios Comparig Two Proportios IPS Chapter 8. 009 W.H. Freema ad Compay
Objectives (IPS Chapter 8.) Comparig two proportios Large-sample CI for a differece i proportios Plus four CI for a differece i proportios Sigificace test for a differece i proportios Relative risk
Comparig two idepedet samples We ofte eed to compare two treatmets used o idepedet samples. We ca compute the differece betwee the two sample proportios ad compare it to the correspodig, approximately ormal samplig distributio for ( ):
Large-sample CI for two proportios For two idepedet SRSs of sizes ad with sample proportio of successes ad respectively, a approximate level C cofidece iterval for p p is ( ) ± m, m is the margi of error m z * SE diff z * ( ) ( ) C is the area uder the stadard ormal curve betwee z* ad z*. Use this method oly whe the populatios are at least 0 times larger tha the samples ad the umber of successes ad the umber of failures are each at least 0 i each samples.
Cholesterol ad heart attacks How much does the cholesterol-lowerig drug Gemfibrozil help reduce the risk of heart attack? We compare the icidece of heart attack over a 5-year period for two radom samples of middle-aged me takig either the drug or a placebo. Stadard error of the differece p p : S E p ˆ ( ˆ p ) p ˆ ( ˆ p ) H. attack Drug 56 05.73% Placebo 84 030 4.4% S E 0.0 7 3(0.9 7 7) 0 5 0.0 4 4(0.9 5 8 6) 0 3 0 0.0 0 7 6 4 The cofidece iterval is ( p ˆ ) ± z * SE So the 90% CI is (0.044 0.073) ±.645*0.00746 0.04 ± 0.05 We are 90% cofidet that the percetage of middle-aged me who suffer a heart attack is 0.6% to.7% lower whe takig the cholesterol-lowerig drug.
Plus four CI for two proportios The plus four method agai produces more accurate cofidece itervals. We act as if we had four additioal observatios: oe success ad oe failure i each of the two samples. The ew combied sample size is 4 ad the proportios of successes are: ~ ad ~ X p X p A approximate level C cofidece iterval is: Use this whe C is at least 90% ad both sample sizes are at least 5. ) ~ ( ~ ) ~ ( ~ * ) ~ ( ~ : ± p p p p z p p CI
Cholesterol ad heart attacks Let s ow calculate the plus four CI for the differece i percetage of middle-aged me who suffer a heart attack (placebo H. attack ppq Drug 56 05.78% Placebo 84 030 4.8% drug). ~ X 56 ~ X 84 p 0.078 ad p 05 030 0.048 Stadard error of the populatio differece p - p : SE ~ p ( ~ p) ~ p( ~ p ) 0.078(0.97) 053 0.048(0.958) 03 0.0057 The cofidece iterval is ( ~ p ~ p) ± z * SE So the 90% CI is (0.048 0.078) ±.645*0.00573 0.04 ± 0.0094 We are 90% cofidet that the percetage of middle-aged me who suffer a heart attack is 0.46% to.34% lower whe takig the cholesterol-lowerig drug.
Test of sigificace If the ull hypothesis is true, the we ca rely o the properties of the samplig distributio to estimate the probability of drawig samples with proportios ad at radom. H 0 : p p p Our best estimate the pooled sample of p is, proportio p ˆ ( p ˆ ) z total successes total observatio s ( ) cout cout 0 This test is appropriate whe the populatios are at least 0 times as large as the samples ad all couts are at least 5 (umber of successes ad umber of failures i each sample).
Gastric Freezig Gastric freezig was oce a treatmet for ulcers. Patiets would swallow a deflated balloo with tubes, ad a cold liquid would be pumped for a hour to cool the stomach ad reduce acid productio, thus relievig ulcer pai. The treatmet was show to be safe, sigificatly reducig ulcer pai ad widely used for years. A radomized comparative experimet later compared the outcome of gastric freezig with that of a placebo: 8 of the 8 patiets subjected to gastric freezig improved, while 30 of the 78 i the cotrol group improved. H 0 : p gf p placebo H a : p gf > p placebo 8 30 ˆ 8 78 p pooled 0.365 z ( ) 0.34 0.363*0.637 0.385 8 78 0.044 0.3*0.05 0.499 Coclusio: The gastric freezig was o better tha a placebo (p-value 0.69), ad this treatmet was abadoed. ALWAYS USE A CONTROL!
Relative risk Aother way to compare two proportios is to study the ratio of the two proportios, which is ofte called the relative risk (RR). A relative risk of meas that the two proportios are equal. The procedure for calculatig cofidece itervals for relative risk is more complicated (use software) but still based o the same priciples that we have studied. The age at which a woma gets her first child may be a importat factor i the risk of later developig breast cacer. A iteratioal study selected wome with at least oe birth ad recorded if they had breast cacer or ot ad whether they had their first child before their 30 th birthday or after. Birth age 30 Sample size Cacer 683 30.% No 498 0,45 4.6% RR..46.45 Wome with a late first child have.45 times the risk of developig breast cacer.