lecture 1libvolume2.xyz/.../estimation/estimationnotes1.pdf · 2014-05-22 · cas ma 116 •...

14
CAS MA 116 • Statistics II • Summer 2, 2012 • Lecture 1.2 1 Lecture 1.2 “… The greater part of our happiness or misery depends upon our disposition, and not upon our circumstances.” … Martha Washington (1732-1802) 1. Point Estimation and Confidence Interval Estimation 2. Introduction to Hypothesis Testing 3. One-Sample Test for Population Proportion (large n) 4. Two-Sample Test for Difference in Population Proportions 5. Binomial Distribution. One-Sample Test for Population Proportion (large n) Introduction to Point Estimation and Confidence Interval Estimation Recall that population of interest represents the entire group of items (individuals), that we would like to make an inference about. Statistical inference is the process of drawing conclusions about a population parameter based on data, or statistic – an estimate or a summary computed from the observations. Population versus Sample Parameter versus Statistic Definitions: There are two types of estimates for population parameter: confidence interval estimates and point estimates. A confidence interval estimate is a range of values for the population parameter with a pre- defined level of confidence (e.g., 95% confidence interval). A point estimate for a population parameter is the statistic and can be considered the “best” (available) single-number estimate of that parameter. Population Parameter(s) Parameter Estimation Sample Statistic(s) Inference

Upload: others

Post on 22-May-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Lecture 1libvolume2.xyz/.../estimation/estimationnotes1.pdf · 2014-05-22 · CAS MA 116 • Statistics II • Summer 2, 2012 • Lecture 1.2 1 Lecture 1.2 “… The greater part

CAS MA 116 • Statistics II • Summer 2, 2012 • Lecture 1.2

1

Lecture 1.2

“… The greater part of our happiness or misery depends upon our disposition, and not upon our circumstances.” … Martha Washington (1732-1802)

1. Point Estimation and Confidence Interval Estimation 2. Introduction to Hypothesis Testing 3. One-Sample Test for Population Proportion (large n) 4. Two-Sample Test for Difference in Population Proportions 5. Binomial Distribution. One-Sample Test for Population Proportion (large n)

Introduction to Point Estimation and Confidence Interval Estimation Recall that population of interest represents the entire group of items (individuals), that we would like to make an inference about. Statistical inference is the process of drawing conclusions about a population parameter based on data, or statistic – an estimate or a summary computed from the observations.

Population versus Sample Parameter versus Statistic

Definitions: There are two types of estimates for population parameter: confidence interval estimates and point estimates. A confidence interval estimate is a range of values for the population parameter with a pre-defined level of confidence (e.g., 95% confidence interval). A point estimate for a population parameter is the statistic and can be considered the “best” (available) single-number estimate of that parameter.

Population

Parameter(s)

Parameter Estimation

Sample

Statistic(s)

Inference

Page 2: Lecture 1libvolume2.xyz/.../estimation/estimationnotes1.pdf · 2014-05-22 · CAS MA 116 • Statistics II • Summer 2, 2012 • Lecture 1.2 1 Lecture 1.2 “… The greater part

CAS MA 116 • Statistics II • Summer 2, 2012 • Lecture 1.2

2

Examples:

1) Based on a random sample of the 100 patients visiting ER this weekend, the average waiting time is estimated to be 37.85 minutes. 37.85 minutes is a point estimate of the average waiting time

Question: How far is the sample mean of 37.85 minutes is from true (population) average waiting time at ER (means for all weekends for all patients)?

2) Based on a random sample of the 100 patients visiting ER this weekend, the average waiting

time is estimated to be between 32.65 minutes and 42.10 minutes.

(37.65, 42.10) minutes is a confidence interval estimate of the average waiting time Confidence Interval Estimates provide a researcher with the range of possible, or acceptable, values of the true, unknown population parameter. The basic structure for any confidence interval is:

point estimate ± multiplier * standard error,

where “multiplier * standard error” = the margin of error. Note that: • The margin of error is a build in component that addresses how close (or how far) the point

estimates are from the true, unknown parameter.

• The (estimated) variance in point estimates (e.g., 𝜎! , 𝑜𝑟  𝑠!), is called the standard error.

• The standard error depends on the sample size and the true population standard deviation (i.e.,

standard error goes down as the sample size goes up).

• Standard error interpretation: If repeated samples of (sample size) are obtained from this same population, we would estimate the resulting sample (statistic) to be about (value of standard error) away from the true (population parameter) on average.

• The multiplier depends on the confidence level and the population parameter, but not the

sample size deviation (i.e., multiplier is higher for higher values of confidence level).

Page 3: Lecture 1libvolume2.xyz/.../estimation/estimationnotes1.pdf · 2014-05-22 · CAS MA 116 • Statistics II • Summer 2, 2012 • Lecture 1.2 1 Lecture 1.2 “… The greater part

CAS MA 116 • Statistics II • Summer 2, 2012 • Lecture 1.2

3

Confidence Intervals for Decision Making

Principle 1: A value not in a CI can be rejected as possible value of the population parameter. A value in a CI is an “acceptable” or “reasonable” possibility for the value of a population parameter.

Principle 2: When the CIs for parameters for two different population parameters do not overlap,

it is reasonable to conclude that the parameters for the two populations are different.

1. The probability that the true parameter falls in a particular, already computed, confidence interval is either 0 or 1. The interval is now fixed and the parameter is NOT random, so the parameter is either in that particular interval or it is not.

2. A 95% Confidence Interval Interpretation: We are 95% confident that the true parameter value lies inside the confidence interval. The interval provides a range of reasonable values for the population parameter.

3. The 95% Confidence Level Interpretation: If the procedure were repeated many times (that

is, if we repeatedly took a random sample of the same size and computed the 95% confidence interval for each sample), we would expect 95% of the resulting confidence intervals to contain the true population parameter.

Confidence Intervals for Population Proportion

The assumptions required for CI for a population proportion to be valid: (1) the sample size n is large

enough (check: 5ˆ ≥pn and ( ) 5ˆ1 ≥− pn ), and (2) the data are a random sample from that population. Type of the Formula Formula Formula for Approximate Confidence Interval

for the Population Proportion p n

ppZp )ˆ1(ˆˆ )2/(1−

± − α

Formula for Conservative Confidence Interval for the Population Proportion p

Note: here 𝒑=0.5 is used to compute the standard error:

nZp

21ˆ )2/(1 α−±

nnnpppSE

21)5.01(5.0)ˆ1(ˆ)ˆ( =

−=

−=

Formula for the Sample Size required to

produce an estimate for the population proportion p

2)2/(1)1( ⎟⎟⎠

⎞⎜⎜⎝

⎛−= −

EZ

ppn α

Formula for the Approximate Sample Size. If the population parameter p is unknown, the sample estimate 𝒑 can be used instead

2)2/(1)ˆ1(ˆ ⎟⎟⎠

⎞⎜⎜⎝

⎛−= −

EZ

ppn α

Formula  for  the  Conservative  Sample  Size  (p=0.5)  

2)2/(125.0 ⎟⎟⎠

⎞⎜⎜⎝

⎛= −

EZ

n α

Page 4: Lecture 1libvolume2.xyz/.../estimation/estimationnotes1.pdf · 2014-05-22 · CAS MA 116 • Statistics II • Summer 2, 2012 • Lecture 1.2 1 Lecture 1.2 “… The greater part

CAS MA 116 • Statistics II • Summer 2, 2012 • Lecture 1.2

4

Exercise (D’Agostino, Example 7.1, 7.2): Testing Population Proportion of Patients with Osteoarthritis

The medical records of a random sample of 200 patients are reviewed for the diagnostics of arthritis. Suppose that 38 patients are observed with diagnosed osteoarthritis. Sample proportion p̂ (a point estimate for the population proportion p) was computes as: 19.0200/38ˆ ==p , or 19%.

a) Compute a 95% confidence interval for the population proportion p of all patients in the physician’s

practice with diagnosed osteoarthritis.

First, we have to check if the main conditions for using CI formula are satisfied. It is given that the sample of 200 patients is a random sample, so we only need to check if the sample size is large enough. A large sample is defined as one that satisfies the following: 5ˆ ≥pn and ( ) 5ˆ1 ≥− pn

In our case, n=200, 19.0ˆ =p and both conditions are satisfied

53819.0*200ˆ >==pn and 516281.0*200)ˆ1( >==− pn The standard error of the sample proportion is computed as:

s.e.( p̂) = p̂(1− p̂)n

=

For 95% confidence interval 96.1)2/05.0(1)2/(1 == −− ZZ α and the appropriate formula is the following:

p̂± Z1−(α /2)p̂(1− p̂)n

=

b) Based on the computed interval, could you conclude that the proportion of all patents with osteoarthritis in the clinic is significantly lower than 50%? Explain.

c) Compute the number patients required to estimate the population proportion p of all patients in the

physician’s practice with diagnosed osteoarthritis with precision of 1% (E=0.01) at 95% confidence level.

Since the true population proportion p is unknown, we will the formula for approximate sample

size n with 96.1)2/05.0(1)2/(1 == −− ZZ α

=⎟⎟⎠

⎞⎜⎜⎝

⎛−= −

2)2/(1)ˆ1(ˆ

EZ

ppn α

Answer: 5913

Page 5: Lecture 1libvolume2.xyz/.../estimation/estimationnotes1.pdf · 2014-05-22 · CAS MA 116 • Statistics II • Summer 2, 2012 • Lecture 1.2 1 Lecture 1.2 “… The greater part

CAS MA 116 • Statistics II • Summer 2, 2012 • Lecture 1.2

5

Introduction to Hypothesis Testing

Recall that Hypothesis Testing uses the point estimate to attempt to reject/accept a hypothesis about the population. Usually researchers want to reject the notion that chance alone can explain the sample results.

ü Hypothesis testing is applied to population parameters by specifying a null hypothesis (H0) that

contains a null value for the population parameter—a value that would indicate a baseline, or that nothing of interest is happening: “old news”, “no difference”, etc. In most cases, the researchers are trying to show that the null value is not correct.

ü Hypothesis testing proceeds by obtaining a sample, computing a point estimate (sample statistic), and

assessing how unlikely to obtain this sample statistic if the null parameter value were correct.

Basic Steps in Hypothesis Test

Step 1: Determine the null (H0) and alternative (Ha) hypotheses. Note: Hypotheses are statements ABOUT population parameters NOT ABOUT sample statistics. Step 2: Verify necessary data conditions (assumptions), and if met, summarize the data into an appropriate test statistic (using appropriate data summary, or sample statistic). Step 3: Assuming the null (H0) hypothesis is true, find either rejection region or the p-value. Step 4: Decide whether or not the result is statistically significant based on rejection region or based on the p-value, the probability of getting a test statistic as extreme or more extreme (in the direction of Ha) than the observed value of the test statistic, assuming H0 is true. Decision based on the rejection region: --- If the test statistic falls into the rejection region, then we reject, then the result IS statistically significant, the decision is to reject H0; otherwise the result IS NOT statistically significant, the decision is to fail to reject H0. Decision based on the p-value: If the p-value ≤ α, then the result IS statistically significant, the decision is to reject H0. If the p-value >α, then the result IS NOT statistically significant, the decision is to fail to reject H0. Step 5: Report the conclusion in the context of the problem (question of interest).

Page 6: Lecture 1libvolume2.xyz/.../estimation/estimationnotes1.pdf · 2014-05-22 · CAS MA 116 • Statistics II • Summer 2, 2012 • Lecture 1.2 1 Lecture 1.2 “… The greater part

CAS MA 116 • Statistics II • Summer 2, 2012 • Lecture 1.2

6

One-Sample Hypothesis Test for Population Proportion (Large n)

Test Scenario

Data Population Parameter

Sample Statistics

Response Explanatory Variable

Population Proportion

1 Sample 𝑝  𝑝 =𝑥𝑛

=#  𝑠𝑢𝑐𝑒𝑠𝑠𝑒𝑠

𝑛

Categorical (YES/NO, Success/Failure, True/False)

________

Is the true population proportion of adults who believe in life after death is more than 70%? Large Sample Hypothesis Test for Population Proportion H0: p=p0 Required assumptions:

• Sample size n is large enough (check: 𝑛𝑝! ≥ 5  and 𝑛(1− 𝑝!) ≥ 5 ) • Data are a random sample from Binomial population.

Test Statistics:

nppppZ)1(

ˆ

00

0

−= where  𝑝 = !

!= #  !"#$!!$!

!

Decision Rule: Ha: p>p0 𝒁 ≥ 𝒁𝟏!𝜶 Ha: p≠p0 𝒁 ≥ 𝒁𝟏!𝜶/𝟐 Ha: p<p0 𝒁 ≤ −𝒁𝟏!𝜶

Example (D’Agostino, Example 7.3): Testing Proportion of Cases with Abnormality Correctly Detected Against a Referent. Suppose that a diagnostic test has been shown to be 80% effective in de-tecting a genetic abnormality in human cells. An investigator modifies the diagnostic testing protocol and wishes to test if the new protocol has a detection rate that is significantly different from 80% in specimens known to possess the abnormality. The new protocol is applied to 300 independent specimens of human cells known to possess the abnormality. The abnormality is detected in 222 specimens. Run the appropriate test at a 5% level of significance. Step1: Define parameter of interest and state the hypothesis.

Parameter: p = true detection rate

H0: p = 0.8 Ha: p ≠ 0.8 Significance level α = 0.05 Step2: Verify necessary data conditions and if met, summarize the data into an appropriate test statistic:

p̂ = xn=

np 0= n 1− p0( ) = Both conditions are satisfied, so we will use Z as our test statistic:

Z = p̂− p0p0 (1− p0 )

n

=

Page 7: Lecture 1libvolume2.xyz/.../estimation/estimationnotes1.pdf · 2014-05-22 · CAS MA 116 • Statistics II • Summer 2, 2012 • Lecture 1.2 1 Lecture 1.2 “… The greater part

CAS MA 116 • Statistics II • Summer 2, 2012 • Lecture 1.2

7

Step3: Assuming the H0 is true, define decision rule: Reject Ho if 𝒁 ≥ 𝒁𝟏!𝜶/𝟐, 𝒐𝒓   𝒁 ≥ 𝟏.𝟗𝟔

Step 4: Decide whether or not the result is statistically significant based on rejection region:

Step 5: Report the conclusion in the context of the problem (question of interest). Based on the sample of n =______ abnormal specimens, there _________ significant evidence, at ______ level, to conclude that the modified protocol has a significantly different detection rate than 80% (the rate for original diagnostic test). Exercise: (D’Agostino, Example 7.3): Testing Proportion of Cases with Flu Following Vaccination Against Referent.

Step 1: Define parameter of interest and state the hypothesis.

Parameter: _________________________________________________________

H0: _____________ Ha: _________________ Significance level α =_______ Step 2: Verify necessary data conditions and if met, summarize the data into an appropriate test statistic: Check: 𝑛𝑝! ≥ 5  and 𝑛(1 − 𝑝!) ≥ 5 Test statistic is:

=−

−=

npppp

Z)1(

ˆ

00

0

Step 3: Assuming the H0 is true, define decision rule: Reject Ho if _______________________________ Step 4: Decide whether or not the result is statistically significant based on rejection region:

Step 5: Report the conclusion in the context of the problem (question of interest).

Based on the sample of n=___________, there is ________ significant evidence, at level α=________, to conclude that ________________________________________________

Page 8: Lecture 1libvolume2.xyz/.../estimation/estimationnotes1.pdf · 2014-05-22 · CAS MA 116 • Statistics II • Summer 2, 2012 • Lecture 1.2 1 Lecture 1.2 “… The greater part

CAS MA 116 • Statistics II • Summer 2, 2012 • Lecture 1.2

8

Two-Sample Hypothesis Test for Difference in Population Proportions

Assumptions Test Statistic Confidence Interval Large n1, n2 𝒏𝟏𝒑𝟏 ≥ 𝟓  and 𝒏𝟏(𝟏 − 𝒑𝟏) ≥ 𝟓 and 𝒏𝟐𝒑𝟐 ≥ 𝟓   𝒏𝟐(𝟏 − 𝒑𝟐) ≥ 𝟓

⎟⎟⎠

⎞⎜⎜⎝

⎛+−

−=

21

21

11)ˆ1(ˆ

ˆˆ

nnpp

ppZ

where 222111 /ˆ,/ˆ nXpnXp ==

21

21ˆnnXXp

+

+=

2

22

1

11)2/(121

)ˆ1(ˆ)ˆ1(ˆ)ˆˆ(npp

nppZpp −

+−

±− − α

2

12211)2/(12⎟⎟

⎜⎜

⎛ ++= −−

ESZqpqpZqp

niβα

where ES=|p2-p1| (under Ha)

pqppp −=+

= 1,2

21

Note: when test for (p1-p2) or construct confidence interval for (p1-p2) necessary conditions are the same. Example (D’Agostino, Chapter 7, Problem 20): Suppose an observational study is conducted to

investigate the smoking behaviors of male and female patients with a history of coronary heart disease. Among 220 men surveyed, 80 were smokers. Among 190 women surveyed, 95 were smokers.

a. Construct a 95% confidence interval for the difference in the proportions of males and females

who smoke. -What do we have? Categorical Variable: Yes = “smoke”, No = “does not smoke” Two groups: group 1 - male and group 2 – female, n1=220 x1=80 and n2=190 x2=95

- We can compute the corresponding sample proportions:

36.022080p̂1 == and 5.0

19095p̂2 ==

- The formula for a corresponding 95% CI for (p1 - p2) is

n

)p̂-(1p̂+

n)p̂-(1p̂

Z )p̂-p̂(2

22

1

11

2α121 −±

- In order to use it, we have to check if both samples are sufficiently large: min(n1 p̂ 1,n1(1- p̂ 1))=min(220(0.36),220(0.64))=79 > 5 min(n2 p̂ 2,n2(1- p̂ 2))=min(190(0.50),190(0.50))=95 >5 Both conditions are satisfied, so we can use the formula and compute a 95% CI for (p1 - p2) (recall that for 95% confidence 96.1Z

2α1 =− ):

(0.36 - 0.50) + (1.960) 1900.50)-0.50(1+

2200.36)-0.36(1 =

Page 9: Lecture 1libvolume2.xyz/.../estimation/estimationnotes1.pdf · 2014-05-22 · CAS MA 116 • Statistics II • Summer 2, 2012 • Lecture 1.2 1 Lecture 1.2 “… The greater part

CAS MA 116 • Statistics II • Summer 2, 2012 • Lecture 1.2

9

b. Based on part a), would you reject H0:p1=p2 (equivalent to H0:p1-p2=0)? ______________________________________

c. Perform an appropriate test of hypothesis to test if the proportion of female who smoke is significantly higher than the proportions of males who smoke at 5% significance level.

Step 1: Define parameter of interest and state the hypothesis. Parameter: p1 – p2, true population difference in proportions of male and female smokers

H0:___ p1-p2=0 ____ Ha:___ p1-p2<0________ Significance level α =0.05 Step 2: Verify necessary data conditions and if met, summarize the data into an appropriate

test statistic: Check: 𝑛!𝑝! ≥ 5  and 𝑛!(1 − 𝑝!) ≥ 5 and 𝑛!𝑝! ≥ 5   and 𝑛!(1 − 𝑝!) ≥ 5. min(n1 p̂ 1,n1(1- p̂ 1))=min(220(0.36),220(0.64))=79 > 5 min(n2 p̂ 2,n2(1- p̂ 2))=min(190(0.50),190(0.50))=95 >5

Test statistic is:

⎟⎟⎠

⎞⎜⎜⎝

⎛+−

−=

21

21

11)ˆ1(ˆ

ˆˆ

nnpp

ppZ , where 222111 /ˆ,/ˆ nXpnXp == and 21

21ˆnnXXp

+

+=

36.022080p̂1 == , 5.0

19095p̂2 == , and 4268.0

1902209580ˆ

21

21 =+

+=

+

+=

nnXXp

8.205.014.0

)190/1220/1)(43.01(43.05.036.0

11)ˆ1(ˆ

ˆˆ

21

21 −=−

=+−

−=

⎟⎟⎠

⎞⎜⎜⎝

⎛+−

−=

nnpp

ppZ

Step 3: Assuming the H0 is true, define decision rule: ____________________________________________________________________

Step 4: Decide whether or not the result is statistically significant based on rejection region: _______________________________________________________________ Step 5: Report the conclusion in the context of the problem (question of interest). Based on two samples of male n1=220 and female n2=195, there is a significant evidence,

at level α = 0.05,to conclude that the proportion of female who smoke is significantly higher than the proportion of males who smoke.

Exercise: Go over examples in the D’Agostino’s book, Example 7.7 and Example 7.8.

Page 10: Lecture 1libvolume2.xyz/.../estimation/estimationnotes1.pdf · 2014-05-22 · CAS MA 116 • Statistics II • Summer 2, 2012 • Lecture 1.2 1 Lecture 1.2 “… The greater part

CAS MA 116 • Statistics II • Summer 2, 2012 • Lecture 1.2

10

Sample Size Determination in Tests for Differences in Proportions

Example (D’Agostino, Example 7.17, Chapter7): Suppose we wish to design a study to compare two treatments with respect to the proportion of successes in each. A two-sided test is planned at a 5% level of significance. Based on a review of the literature, p1=0.20. How many subjects would be required per group to detect p2=0.10 with 90% power?

The formula to determine sample size is given by:

2

12211)2/(12⎟⎟

⎜⎜

⎛ ++= −−

ESZqpqpZqp

niβα

, where ES=|p2-p1| and pqppp −=+

= 1,2

21

The ES (the effect size) is: ES=|p2-p1| = |0.2-0.1| = 0.1

Since α = 0.05, Z1-α/2 = Z0.975 = 1.96.

Similarly, for the power = 0.90, β = 1 – power = 1-0.9 = 0.1, and Z1-β =Z0.90= 1.282

85.015.011

,15.022.01.0

221

=−=−=

=+

=+

=

pq

ppp

Substituting,

2669.265

1.0282.1*9.0*1.08.0*2.096.1*2*85.0*15.02

22

12211)2/(1

≈=

=⎟⎟⎠

⎞⎜⎜⎝

⎛ ++=

⎟⎟

⎜⎜

⎛ ++= −−

ESZqpqpZqp

niβα

Thus, we need at least 266 subjects in each group.

Page 11: Lecture 1libvolume2.xyz/.../estimation/estimationnotes1.pdf · 2014-05-22 · CAS MA 116 • Statistics II • Summer 2, 2012 • Lecture 1.2 1 Lecture 1.2 “… The greater part

CAS MA 116 • Statistics II • Summer 2, 2012 • Lecture 1.2

11

Binomial Distribution

An important class of discrete variables is called the Binomial random variables. The Binomial distribution model has specific attributes:

There are n trials (performances of the binomial experiment), where n is determined in

advance and is not random. Each trial results in only one of the two possible outcomes, which we call either a

success or a failure. The probability of a success on each trial is constant, denoted p, with 0≤p≤1. The probability of a failure on each trial is also constant, denoted q=1-p, with 0≤q≤1. The trials are independent. X~ Binomial (n, p) = “number of successes in the n trials of a binomial experiment”

Exercise (Priority of Information) According to a national survey, 25% of teenagers can correctly name the city where the US

Constitution was written. Assume a random sample of eight teenagers. a) Find the probability that none of the teenagers can name the city.

b) Find the probability that at most two of the teenagers can name the city.

The Binomial Distribution X~ Binomial (n, p) Probability of exactly k successes in trials:

𝑃 𝑋 = 𝑘 = 𝐶!!𝑝! 1− 𝑝 !!! = 𝑛𝑘 𝑝! 1− 𝑝 !!! ,

where 𝑛𝑘 = !!!! !!! !

. Mean (Expected value) of X is 𝜇 = 𝑛𝑝 Standard Deviation of X is  𝜎 = 𝑛𝑝(1− 𝑝) If 𝑛𝑝 ≥ 5  and  𝑛 1− 𝑝 ≥ 5 , X is approximately 𝑁(𝜇 = 𝑛𝑝,𝜎 = 𝑛𝑝 1− 𝑝 )

Page 12: Lecture 1libvolume2.xyz/.../estimation/estimationnotes1.pdf · 2014-05-22 · CAS MA 116 • Statistics II • Summer 2, 2012 • Lecture 1.2 1 Lecture 1.2 “… The greater part

CAS MA 116 • Statistics II • Summer 2, 2012 • Lecture 1.2

12

One-Sample Hypothesis Test for Population Proportion (small n) Small Sample Hypothesis Test for Population Proportion H0: p=p0 Required assumption: Data are a random sample from Binomial population. Test Statistics: X (observed # successes), X ~ Binomial(n, p0) Decision rule is based on p-value: Ha: p>p0 p-value = P(X≥x) = P(X=x)+P(X=x+1) +...+ P(X=n) Ha: p<p0 p-value = P(X≤x) = P(X=0)+P(X=1) +...+ P(X=x) Ha: p≠p0 p-value = P(X≠x) =1- P(X=x) If the p-value ≤ α, then reject H0. If the p-value >α, then fail to reject H0. Recall Probability of exactly k successes in trials: 𝑃 𝑋 = 𝑘 = 𝐶!!𝑝!! 1− 𝑝! !!! = 𝑛

𝑘 𝑝!! 1− 𝑝! !!! ,    where 𝑛𝑘 = !!!! !!! !

Example: Kudzu Vine and Curbing Binge Drinking The hardy, invasive kudzu vine (shown in the picture at the

right), introduced to this country decades ago to control soil erosion, could have what it takes to curb binge drinking, new research suggests.

A researcher recruited 10 people in their 20s to spend two 90-

minute sessions consuming beer and watching TV. Researchers selected people who said they regularly consumed three to four drinks per day. After the first session, subjects received capsules of kudzu. None of the subjects had any side effects from mixing kudzu with beer. Findings showed that 80% of the subjects decreased their amount of beer intake (as compared to the first session levels).

Question of interest: Can the researcher conclude that a majority of users of kudzu would decrease

their beer intake? Step1. Parameter: p, true proportion of the subjects who decreased their beer intake

H0: p=0.5 Ha: p>0.5 Significance level α = 0.10 (choose and fix in advance) Step 2: Verify necessary data conditions and compute an appropriate test statistic:

55.0*100 ==np ( ) 51 0 =− pn Both conditions are met on the boundary, so we may, but would better not use Z statistics, instead

we will use the observed number of successes x = 10*0.8 =8 as our test statistics.

Step 3: Instead of definition of the rejection

region, we will compute p-value and compare it to 10% significance level:

Page 13: Lecture 1libvolume2.xyz/.../estimation/estimationnotes1.pdf · 2014-05-22 · CAS MA 116 • Statistics II • Summer 2, 2012 • Lecture 1.2 1 Lecture 1.2 “… The greater part

CAS MA 116 • Statistics II • Summer 2, 2012 • Lecture 1.2

13

Step 4: Since p-value < .10 we reject H0. Step 5: Conclusion.

Based on a study of n=10 people, there is significant evidence that a majority of users of kudzu would decrease their beer intake. Exercise: A multiple choice test has 10 questions each with 4 possible choices. A particular student claims he has a ‘gift’ and without even looking at the questions can do better than just guessing. This leads to the following hypotheses H0: p = 0.25 versus Ha: p > 0.25 where p = the probability of correctly guessing any question; note that p > ¼ implies the student is better than random guessing, supporting he has this ‘gift’. His test results come back and he got 8 out of 10 answers correct. Perform small sample hypothesis test for p.

Step1. Determine the null (H0) and alternative (Ha) hypotheses.

Parameter______________________________________________

H0:_______________ Ha:_________________ Significance level α =_________ Step 2: Verify necessary data conditions, and compute an appropriate test statistic Test statistic is:

Step 3: Assuming H0 is true, define decision rule (based on rejection region or p-value)

The decision rule: Reject Ho if ______________ Do not reject Ho if __________________________

Step 4: Decide whether or not the result is statistically significant (reject or fail to reject H0): Step 5: Report the conclusion in the context of the problem (question of interest).

Based on the sample of n=____________________, there is________ significant evidence, at level α = ________________,to conclude that ____________________ ____________________________________________________________________

Page 14: Lecture 1libvolume2.xyz/.../estimation/estimationnotes1.pdf · 2014-05-22 · CAS MA 116 • Statistics II • Summer 2, 2012 • Lecture 1.2 1 Lecture 1.2 “… The greater part

CAS MA 116 • Statistics II • Summer 2, 2012 • Lecture 1.2

14