Economics 173 Business Statistics Lecture 4 Fall, 2001 Professor J. Petry
-
Upload
alisha-norman -
Category
Documents
-
view
213 -
download
0
Transcript of Economics 173 Business Statistics Lecture 4 Fall, 2001 Professor J. Petry
Economics 173Business Statistics
Lecture 4
Fall, 2001
Professor J. Petry
http://www.cba.uiuc.edu/jpetry/Econ_173_fa01/
Introduction to Hypothesis Testing
Introduction to Hypothesis Testing
Chapter 10
3
10.1 Introduction
• The purpose of hypothesis testing is to determine whether there is enough statistical evidence in favor of a certain belief about a parameter.
• Examples– Is there statistical evidence in a random sample of potential
customers, that support the hypothesis that more than p% of the potential customers will purchase a new product?
– Is a new drug effective in curing a certain disease? A sample of patients is randomly selected. Half of them are given the drug and half are given a placebo. The improvement in the patients conditions is then measured and compared.
4
10.2 Concepts of hypothesis testing
– There are two hypotheses (about a population parameter(s)) • H0 - the null hypothesis [ for example = 5]• H1 - the alternative hypothesis [ > 5]
– The null always contains =, and may contain ≥, ≤– The alternative hypothesis is most important, it is what you are trying to prove.
• The alternative can involve >, < or ≠• The alternative establishes whether the test is one-tailed or two-tailed.• The alternative establishes the location of the rejection region
5
– We always assume the null hypothesis is true. • Calculate a statistic related to the parameter hypothesized.• Pose the question: How probable is it to obtain a statistic value
at least as extreme as the one observed from the sample?• If the sample statistic is in an extreme location of the sampling
distribution, you are going to be likely to reject the null. On the other hand, if it is reasonably close to the center of the sampling distribution you will not reject the null.
= 5 x
6
– Make one of the following two conclusions (based on the test):• Reject the null hypothesis in favor of the alternative hypothesis.
» There is enough evidence to infer that the alternative is true• Do not reject the null hypothesis in favor of the alternative hypothesis.
» There is not enough evidence to infer that the alternative is true
– Two types of errors are possible when making the decision whether to reject H0
• Type I error - reject H0 when it is true.
• Type II error - do not reject H0 when it is false.– Resulting in one of the following four situations . . .
States of NatureH0 is true H0 is false
Accept H0 1-α β, Type II error
Reject H0 α, sig lev, Type I error 1-β, power of test
7
– Terminology• Null hypothesis, Alternative hypothesis • Test statistic, standardized test statistic, p-value• Critical value, standardized critical value, significance level
– Analogy: Hypothesis testing is similar to a jury trial• Assume innocent until proven guilty
– Assume H0 is true until proven otherwise
• Level of proof required to establish guilty verdict? What if you convict an innocent person?– Identical to establishing significance level of test. Type I error is equivalent to convicting an innocent person.– “Beyond a reasonable doubt” is court of law norm– Standard in statistics varies depending upon the issue at stake:
» Overwhelming evidence = 1% significance level» Strong evidence = 1.001-5% significance level» Weak evidence = 5.001-10% significance level» No statistical evidence = 10.001% or higher significance level
8
10.3 Testing the Population Mean When the Population Standard Deviation is Known
• Example 10.1– A new billing system for a department store will be cost-
effective only if the mean monthly account is more than $170.
– A sample of 400 monthly accounts has a mean of $178.– If the account are approximately normally distributed with
= $65, can we conclude that the new system will be cost effective?
9
• Solution– The population of interest is the credit accounts at
the store.– We want to show that the mean account for all
customers is greater than $170.
H1 : > 170– The null hypothesis must specify a single value of
the parameter
H0 : = 170
10
Is a sample mean of 178 sufficiently greater than 170 to infer that the population mean is greater than 170?
178
If is really equal to 170, then . The distribution of the sample mean should look like this.
170x
Is it likely to have under the null hypothesis (= 170)?178x
170x
11
– Instead of using the statistic , we can use the standardized value z.
– Then, the rejection region becomes
x
n
xz
zz One tail test
The standardized test statistic
12
• Example 10.1 - continuedH0: = 170
H1: > 170– Test statistic:
– Rejection region: z > z.051.645.– Conclusion: Since 2.46 > 1.645, reject the null hypothesis in
favor of the alternative hypothesis. – 2.46 is test statistic value, p-value is probability associated w/
the test statistic value (see below).– 1.645 is the critical value. Significance level of the test is the
probability associated with this value.
46.240065
170178
n
xz
13
– The p - value provides information about the amount of statistical evidence that supports the alternative hypothesis.
– The p-value of a test is the probability of observing a test statistic at least as extreme as the one computed, given that the null hypothesis is true.
– Illustrating with example 10.1 . . .
P-value method
14
0069.)4615.2z(P
)40065
170178z(P
)178x(P
170x 178x
The probability of observing a test statistic at least as extreme as 178, given that the null hypothesis is true is:
The p-value
15
• Interpreting the p-value– Because the probability that the sample mean will
assume a value of more than 178 when = 170 is so small (.0069), there are reasons to believe that > 170.
178x
170:H x0 170:H x1
…it becomes more probable under H1, when 170x
Note how the event is rare under H0
when but...178x
,170x
We can conclude that the smaller the p-value the more statistical evidence exists to support thealternative hypothesis.
We can conclude that the smaller the p-value the more statistical evidence exists to support thealternative hypothesis.
16
• Describing the p-value– If the p-value is less than 1%, there is overwhelming
evidence that support the alternative hypothesis.– If the p-value is between 1% and 5%, there is a strong
evidence that supports the alternative hypothesis.– If the p-value is between 5% and 10% there is a weak
evidence that supports the alternative hypothesis.– If the p-value exceeds 10%, there is no evidence that
supports of the alternative hypothesis.
17
• The p-value and rejection region methods– The p-value can be used when making decisions
based on rejection region methods as follows:• Define the hypotheses to test, and the required
significance level • Perform the sampling procedure, calculate the test statistic
and the p-value associated with it.• Compare the p-value to Reject the null hypothesis only
if p <; otherwise, do not reject the null hypothesis.
34.175Lx
= 0.05
170x
178x
P-value = 0.0069
18
• Example 10.2– A government inspector samples 25 bottles of catsup
labeled “Net weight: 16 ounces”, and records their weights.
– From previous experience it is known that the weights are normally distributed with a standard deviation of 0.4 ounces.
– Can the inspector conclude that the product label is unacceptable?
Catsup
15.8
16.0
16.2
15.7
.
.
.
Catsup
15.8
16.0
16.2
15.7
.
.
.
19
• Solution– We need to draw a conclusion about the mean
weights of all the catsup bottles.– We investigate whether the mean weight is less
than 16 ounces (bottle label is unacceptable).
H1: < 16H0: = 16
– The test statistic is
n
xz
– Select a significance level: = 0.05
– Define the rejection regionz < - z1.645
Then
One tail test
20
we want this mistake to happen not more than 5% of the time.
16
0.05
A sample mean far below 16,should be a rare event if = 16.
So, if in reality =16, but we reject this hypothesis in favor of < 16 because was very small, x
x
25.1254.0
1690.15
n
xz
Rejection region -1.25
0.05
0-z= -1.645
21
0-z= -1.645
0.05
25.1254.0
1690.15
n
xz
Rejection region-1.25
Since the value of the test statistic does not fall in the rejection region, we do not reject the null hypothesis in favor of the alternative hypothesis.
There is insufficient evidence to inferthat the mean is less than 16 ounces.
The p-value = P(Z < - 1.25) = .1056 > .05
22
• Example 10.3
– The amount of time required to complete a critical part of a production process on an assembly line is normally distributed. The mean was believed to be 130 seconds.
– To test if this belief is correct, a sample of 100 randomly selected assemblies was drawn, and the processing time recorded. The sample mean was 126.8 seconds.
– If the process time is really normal with a standard deviation of 15 seconds, can we conclude that the belief regarding the mean is incorrect?
23
• Solution– Is the mean different than 130?
H0: = 130Then
130:H1
– Define the rejection regionz < - zor z > z/2
24
130
0
A sample mean far below 130or far above 130, should be a rare event if = 130.
x x
we want this mistake to happen not more than 5% of the time.
So, if in reality =130, but we mistakenlyreject this hypothesis in favor ofbecause was very small or very large, x
130
20.025
20.025
20.025 20.025
13.210015
1308.126
n
xz
-z= -1.96 z= 1.96
Rejection region
25
0
20.025 20.025
13.210015
1308.126
n
xz
-z= -1.96 z= 1.96
Since the value of the test statistic falls in the rejection region, we reject the null hypothesis in favor of the alternative hypothesis.
There is sufficient evidence to inferthat the mean is not 130.
-2.13
The p-value = P(Z < - 2.13)+P(Z > 2.13) = 2(.0166) = .0332 < .05
2.13
26
– Interval estimators can be used to test hypotheses.– Calculate the 1 - confidence level interval
estimator, then• if the hypothesized parameter value falls within the
interval, do not reject the null hypothesis, while• if the hypothesized parameter value falls outside the
interval, conclude that the null hypothesis can be rejected ( is not equal to the hypothesized value).
Testing hypotheses and intervals estimators
27
• Drawbacks – Two-tail interval estimators may not provide the right
answer to the question posed in one-tail hypothesis tests.
– The interval estimator does not yield a p-value.
There are cases where only tests producethe information needed to make decisions.
28
Calculating the Probability of a Type II Error• To properly interpret the results of a test of
hypothesis, we need to– specify an appropriate significance level or judge the
p-value of a test;– understand the relationship between Type I and
Type II errors.– How do we compute a type II error?
29
• Calculation of a type II error requires that– the rejection region be expressed directly, in terms of
the parameter hypothesized (not standardized).– the alternative value (under H1) be specified.
H0: 0
H1: 1 (0 is not equal to 1)Lx0
1
30
• Revisiting example 10.1– The rejection region was with = .05.– A type II error occurs when a false H0 is not rejected.
34.175x
34.175xL
170
180
.05
175.34
175.34
34.175x
…butH0 is false
Do not reject H0
)180thatgiven34.175x(P
)falseisHthatgiven34.175x(P 0
0764.)40065
18034.175z(P
31
• Effects on of changing – Decreasing the significance level increases the
the value of and vice versa
32
• Judging the test
– A hypothesis test is effectively defined by the significance level and by the the sample size n.
– If the probability of a type II error is judged to be too large, we can reduce it by
• increasing , and/or• increasing the sample size.
33
nzx
thus,n
xz
L
L
By increasing the sample sizethe standard deviation of the sampling distribution of themean decreases. Thus,decreases.
Lx
LxLxLxLxLx LxLx
LxLxLxLxLxAs a result decreases
– In example 10.1, suppose n increases from 400 to 1000.
0)22.3Z(P)100065
18038.173Z(P
38.1731000
65645.1170
nzxL
34
• In summary,– By increasing the sample size, we reduce the
probability of type II error.– Hence, we shall accept the null hypothesis when it is
false less frequently.• Power of a test
– The power of a test is defined as 1 - – It represents the probability to reject the null
hypothesis when it is false.