Lecture 7.1 Lecture 7.1 Statistics may be defined as "a
Statistics may be defined as "a body of methods for making wise decisions in body of methods for making wise decisions in the face ofthe face of uncertainty."
uncertainty." ~W.A. ~W.A. WallisWallis 1)
1) Sampling Distribution for Population ProportionSampling Distribution for Population Proportion 2)
2) Confidence Intervals for Population Proportion.Confidence Intervals for Population Proportion. 3)
3) Sample Size Determination.Sample Size Determination.
The Sampling Distribution of the Sample Proportion The Sampling Distribution of the Sample Proportion Test Test Scenario Scenario Data Population Data Population Parameter Parameter Sample Sample Statistics Statistics Response Explanatory Response Explanatory Variable Variable Population Population Proportion Proportion 1 Sample
1 Sample CategoricalCategorical
(YES/NO, (YES/NO, Success/Failure, Success/Failure, True/False) True/False) ________ ________
Is the true population proportion of adults who
Is the true population proportion of adults who believe in life after death is more than 70%?believe in life after death is more than 70%? Recall:
Recall: 1.
1. Normal CurNormal Cur ve ve Approximation to BiApproximation to Bi nomial disnomial distritri bution bution .. Let X be aLet X be a BinomialBinomial random random variable with the number of trials
variable with the number of trials nn the probability of a success the probability of a success p p .. When the sample size When the sample size (or number of trials)
(or number of trials) nn is large and both is large and both ,, the distribution of Xthe distribution of X could
could be be approximated approximated with with a a normal normal distribution distribution .. 2.
2. SaSamplimpli ng Ding Di sstrtr ibuibu tion of thtion of th e e SSample ample MM eean: an: If the parent populationIf the parent population ISIS aa normalnormal
distribution with a mean
distribution with a mean μ μ and a standard deviation and a standard deviationσ σ , then for, then forany sample sizeany sample size (small or (small or
large), the sample mean will have a
large), the sample mean will have anormalnormal distribution distribution .. 3.
3. CeCentrntr al Lal L imit Timit T heoheorem: rem: If the parent population isIf the parent population isNOTNOT a a normalnormal distribution but with distribution but with a mean
a mean μ μ and a standard deviation and a standard deviation σ σ then for then for a large sample sizea large sample size (n≥30)(n≥30), the sample, the sample
mean will have
mean will haveapproximately normalapproximately normal distribution distribution ..
New Result New Result::
4.
4. SSampamplili ng Dng D isistritri bution bution of thof th e Se Sampample Propole Proportirti on:on: If both
If both , then, then
If many samples of the same size n
If many samples of the same size n are taken and sample size is are taken and sample size is large, then the distribution oflarge, then the distribution of possible values of
possible values of is approximately a normal curve distribution withis approximately a normal curve distribution withmeanmean equals to the true equals to the true population proportion
Facts: According to a spring 2009 poll of more than 2,200 college students across 40 colleges and universities:
• 85 percent of students reported feeling stressed on a daily basis.
• Academic concerns like school work and grades, with 77 percent and 74 percent respectively, maintain their positions as the top drivers of student stress, even over financial woes in today’s economy.
• Six out of 10 students report having felt so stressed they couldn’t get their work done on one or more occasions.
• Since starting college, over 70 percent of students have not considered talking to a counselor to help them deal with stress or other emotional issues.
Sources: Center for the Study of College Student Retention, 2008, American College Health Association’s Spring 2008 National College Health Assessment and Associated Press ―College Stress and Mental Health Poll,‖ Spring 2009.
Exercise: Assume that the true proportion of students who feel stressed on a daily basis 85%.
(a) What is the probability that in a random poll of 100 students more than 50% are feeling stressed on a daily basis?
Option 1: Use the Normal Approximation to Binomial.
Option 2: Use the Sampling Distribution of the Sa mple Proportion
(b) According to MA 115 B1 Intro Survey, 52 out of 108 students reported feeling stressed at the beginning of the semester. What is the approximate probability to obtain the sample proportion of 48% or lower, if the true proportion of all students who feel stressed during the semester is 85%?
Exercise: Telephone poll taken two days after the November 8, 1994, election. From the 800 adults polled, 56% reported that they had voted. However, it was later reported in the press that, in fact,
only 39% of American adults had voted. Suppose the39% rate reported by the press is the correct population proportion. Also assume the responses of the 800 adults polled can be viewed as a
random sample.
1. Describe and sketch the sampling distribution of for a random sample of size n= 800 adults.
2. What is the approximate probability that a sample proportion who voted would be 56% or larger for a random sample of 800 adults?
3. Does it seem that the poll result of 56% simply reflects a sample that, by chance, voted with greater frequency than the general population?
Confidence Intervals for Population Proportion
Recall
Confidence interval estimates a range of values for the population parameter with a pre-defined level of confidence (e.g., 95% confidence interval).
Confidence level of 100(1-α)%, means that 100(1-α)% of the times when we repeat the process of taking samples from the target population of the same size and producing 100(1-α)% Confidence Intervals for the population parameter, the parameter will be contained in these intervals. (Note:
α
is used to denote the significance level.)The basic structure for any confidence interval is:
point estimate ± margin of error = point estimate ± multiplier * standard error,. The assumptions required for CI for a population proportion to be valid:
the sample size n is large enough (check: n pˆ 5 and n1 pˆ 5)
the data are ar andom samplefrom that population.
Type of the F ormul a Formula
General Formu la forConfidence Interval for the Population Proportion p
n p p Z pˆ (1 ) ) 2 / ( 1
Formula for Approximate Confidence Interval for the Population Proportion p
n p p Z pˆ ˆ(1 ˆ) ) 2 / ( 1
Formula for Conservative Confidence Interval for the Population Proportion p
Note: here =0.5 is used to compute the standard error, n n n p p p SE 2 1 ) 5 . 0 1 ( 5 . 0 ) ˆ 1 ( ˆ ) ˆ ( n Z p 2 1 ˆ ) 2 / ( 1
Formula for the Sample Size required to produce an estimate for the population proportion p 2 ) 2 / ( 1 ) 1 ( E Z p p n Formula for the Approximate Sample Size. If
the population parameter p is unknown, the sample estimate can be used instead
2 ) 2 / ( 1 ) ˆ 1 ( ˆ E Z p p n
Formula for the Conservative Sample Size ( p=0.5) 2
) 2 / ( 1 25 . 0 E Z n
Exercise: The proportion of adults that believe in love at first sight. Assume for the sample of 100 people 40 will say they do believe.
1) Compute an approximate 95% confidence interval.
Since the true population proportion is unknown, use the formula for approximate confidence interval: n p p Z pˆ ˆ(1 ˆ) ) 2 / ( 1
2) Compute a conservative 95% confidence interval.
n Z p 2 1 ˆ ) 2 / ( 1
3) Which confidence interval is wider?
__________________________________
4) How many people do we need to survey in order to estimate the true population proportion with 5% accuracy? (E=0.05)
NOTE: The probability that the true parameter lies 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.
Exercise: Do you work more than 40 hours per week?
A poll was conducted by The Heldrich Center for Workforce Development (at Rutgers University). A probability sample of 1000 workers resulted in 560 (for 56%) stating they work more than 40 hours per week.
5) Compute an approximate 95% confidence interval for the true population proportion of people who work more than 40 hours.
n p p Z pˆ ˆ(1 ˆ) ) 2 / ( 1
6) How many people do we need to survey in order to estimate the true population proportion with 10% accuracy? (E=0.1)
From the statement of the problem:
Since the true population proportion p is unknown, use the following formula
2 ) 2 / ( 1 ) ˆ 1 ( ˆ E Z p p n
7) What would a conservative sample size (assuming unknown p and )?
2 ) 2 / ( 1 25 . 0 E Z n
Lecture 7.2-7.3
1. Introduction to Hypothesis Testing. Types of Errors. 2. One Sample Test for Population Mean.
3. P-value. Power and Sample Size Determination.
Introduction to Hypothesis Testing
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.
Achieving statistical significance is equivalent to rejecting the idea that the observed results are plausible if the null value is correct, i.e., rejecting the null hypothesis (H0) in a favor of
alternative hypothesis (Ha).
Alternative hypothesis does not specify any specific value for the true population parameter. It only gives an open interval that may contain possible values of the true parameter, but never contains the null value.
5 Basic Steps in Any 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 Rul e (rejection region or the p-value).
Step 4: Decide whether or not the result is statistically significant based on rejection region:
p-value is 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 the null hypothesis(H0) is true.
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).
Level of Significance, Type I Error, Type II Error, and the Power of a Test
Note: A ― significant ‖ result in the statistical sense does not necessarily imply an ―important ‖ result. It means simply that such a difference from the null hypothesis is ―not very likely to happen just b y chance‖.
The test statistic:
IS a summary of the data that is used to help make the decision,
IS a random variable related to the hypotheses of interest (Ha) having a known probability distribution (under the null hypothesis, H0),
One Sample Hypothesis Test for Population Mean Test Scenario Data Population Parameter Sample Statistics Response Explanatory Variable Population Mean
1 Sample Numerical (Age,
Time, Price)
__________ Can we claim that the average GPA of all BU graduates is higher than 3.0?
Example (D’Agostino, Example 5.8): Testing Mean Systolic Blood Pressure. A large, national study conducted in 2003 reported that the mean systolic blood pressure for males aged 50 was 130 with a standard deviation of 15. In 2004, an investigator hypothesized that due to increased stress in the work-place, faster-paced lifestyles, and poorer nutritional habits, systolic blood pressure have increased. In order to test this hypothesis that the population mean μ blood pressure increased in 2004, we set up two competing hypothesis
Step 1: H0: μ = 130 (―no change‖) Ha: μ>130 (mean blood pressure increased in 2004) Step 2:
Select a random sample from population of interest (n = 108 males aged 50 in 2004) Record the systolic blood pressure on each male
Generate summary statistics ( ) – a point estimate for the population parameter of primary interest μ and compute an appropriate test statistic and based on the value of this statistic make a decision – how likely that H0 is true (―no change‖)
Consider the following scenarios:
Interpretation: The mean systolic blood pressure in the 2004 sample is identical to the population mean from 2003, which would lead us to believe that the null hypothesis, H0, is most likely true and the populations mean in 2004 HAS NOT CHANGED and IS equal to 130.
Notice we cannot say with certainty that the null hypothesis is true because we hav e only a sample of males; however, because the sample was selected at random, we would expect the mean systolic blood pressure among all males aged 50 in 2004 to be close to the observed 130.
Interpretation: The mean systolic blood pressure in the 2004 sample IS SUBSTANTIALLY
HIGHER than the population mean from 2003, which would lead us to believe that the alternative hypothesis, Ha, is most likely true (μ>130).
Interpretation: The mean systolic blood pressure in the 2004 sample IS NUMERICALLY HIGHER (135 > 130) than the population mean from 2003, BUT it may be solely due to chance fluctuation. How likely are we to observe a sample mean of 135 or greater from a population with μ = 130?
Compute this probability using the CLT:
The last scenario illustrates the crux of the hypothesis-testing problem. Conduct the test of hypothesis = to decide whether H0 or H1 is more likely true.
We must determine acritical value, or rejection region, such that:
if the sample mean is less than the critical value, we will conclude that H0 is true (e.g., μ = 130),
if sample mean is greater than the critical value, we will conclude thatHais true (e.g., μ >130).
Instead of determining critical values for that would be specific to each application, we use the CLT to standardize and produce az-score:
is the mean value specified in H0.
Assuming H0 is true Z has a standard normal distribution (N(0,1)).
Z is close to zero when is close to , thenH0 is most likely true
Z is large when is larger than , then H1 is most likely true Need to determine the critical value, or the point at which Z is "too large."
Step 3: Rejection Rule
How likely is that , assuming H0 is true? Using the CLT
How likely is that , assuming H0 is true?
Therefore, if we serve a sample mean that exceeds 132.88 (or Z > 2) and we reject the H0 in favor of the H1, the probability that we are making a mistake rejecting (the probability of TYPE I Error α) is only 2.28%. However, if we reject the H0 for value that exceed 131.44 (or Z > 1), the probability that we are making a mistake rejecting H0 is 0.1587.
We must pre-define the level of TYPE I Error (α) that can be tolerated in the analysis.
Say α=0.05, then we have to find such point x (or z), such that
, therefore z=1.645. Thus, thedecision rule is given by:
Reject Ho if Z≥ 1.645, and fail to reject H0 if Z< 1.645.
Note: the rejection (decision) rule is directly related to a type of the test (one-sided or two-sided), the type of test statistics and direction of the hypothesis.
Once the decision rule is in place, we compute the value of thetest statistic (recall our z-score).
Step 4: The final step in the test of hypothesis is to compare the test statistic to the decision rule to draw a conclusion.
The test statistic falls in the rejection region and therefore we reject Ho because 3.46 > 1.645
Step 5: Conclusion:
Based on the sample of n=108 male, there is significant evidence, at level α = 0.05, to conclude that the mean systolic blood pressure for males aged 50 in 2004 has increased from 130.
Example (D’Agostino, Example 5.9): Testing Mean Cholesterol Level against Referent
Suppose that the mean cholesterol level for males aged 50 is 241. Question of interest: whether cholesterol levels are significantly reduced by modifying diet only slightly.
A random sample of 12 patients (n=12) agrees to participate in the study and follow the modified diet for 3 months. 3 months, their cholesterol levels are me asured and summary statistic is produced on the n=12 subjects. The mean cholesterol level in the sample is 235 with a standard deviation of s=12.5. Based on the data, is there significant evidence that the modified diet reduces cholesterol? Run the appropriate test using a 5% level of significance.
Step1. Determine the null (H0) and alternative (Ha) hypotheses.
We start with the definition of the parameter of interest.
Parameter______________________________________________
H0:_______________ Ha:_________________ Significance level α =_________
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).
In this example, we have a sample of sizen = 12 (n<30) and we do not know the population standard deviation. Here we have the sample standard deviation s = 12.5. Because σ is unknown and the sample is small (n < 30), this is an example of Case 3, and the test statistic is t:
Step 3: Assuming the null (H0) hypothesis is true, define decision rule (or rejection region) The decision rule for any hypothesis testing application depends on three factors:
(1) Whether the test is an upper-, lower-, or two-tailed test (2) The level of significance: α =0.05
(3) The form of the test statistic: t statistic.
In order to determine the appropriate value, we first compute the degrees of freedom: df = 12 — 1 = 11 (then using Table B3) critical value is t = 1.796
The decision rule:
Reject Ho if t <-1.796 Do not reject Ho if t > -1.796
Step 4: Decide whether or not the result is statistically significant based on rejection region: We do not reject Ho because -1.66 > -1.796.
Step 5: Report the conclusion in the context of the problem (question of interest).
Based on the sample of n=12 male, there is no significant evidence, at level α = 0.05,to conclude that the diet reduces cholesterol level, on average.
P-value
Decision on whether or not the result is statistically significant can be also made onp-value . p-value is the probability of getting a test statistic as extreme or more extreme ( in the direction of Ha ) than the observed value of thetest stati sti c , assuming thenul l hypothesis(H 0) is tru e .
If the p-value ≤ α , then the result IS statistically significant, thedecision is to reject H0.
If the p-value >α , then the result IS NOT statistically significant, the decision is to fail to reject H0.
Recall Example 5.8M ean Systol ic B lood Pr essur e again st Referent
H0: μ = 130_(“no change”) Ha: μ>130 (i.e., mean blood pressure increased) Thus, the decision rule is given by:
Reject H0 if Z≥ 1.645, and do not reject H0 if Z< 1.645.
The test statistic is .
Decision: the test statistic falls in the rejection region and therefore wereject H0 because 3.46 > 1.645. Instead of creating rejection region, we can compute the p-value:
p-value = P(test statistic as extreme or more extreme|H0 is true) = P(Z>3.46)<0.0001 <α=0.05 Exercise: Compute p-value for scenarios when or .