0% found this document useful (0 votes)
12 views26 pages

Week8 L1

The document covers the fundamentals of one-sample hypothesis testing, focusing on defining null and alternative hypotheses, understanding Type 1 and Type 2 errors, and calculating p-values. It illustrates the hypothesis testing process using a hot chocolate temperature example, comparing critical value and p-value methods to determine if the mean temperature differs from the ideal. Additionally, it discusses the equivalence of confidence intervals and hypothesis tests, and outlines the steps for testing a population proportion.

Uploaded by

pushp
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views26 pages

Week8 L1

The document covers the fundamentals of one-sample hypothesis testing, focusing on defining null and alternative hypotheses, understanding Type 1 and Type 2 errors, and calculating p-values. It illustrates the hypothesis testing process using a hot chocolate temperature example, comparing critical value and p-value methods to determine if the mean temperature differs from the ideal. Additionally, it discusses the equivalence of confidence intervals and hypothesis tests, and outlines the steps for testing a population proportion.

Uploaded by

pushp
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

ECON10005:

Quantitative Methods 1
Week 8, Lecture 1
One-Sample Hypothesis Tests: Chapter 9

1
Learning objectives

1: Know the steps in testing hypotheses and define 𝐻0 and 𝐻1 .


2: Define Type 1 error, Type 2 error, and power.
3. Formulate null and alternative hypotheses for 𝜇.
4: Explain decision rules, critical values, and rejection regions
5: Perform a hypothesis test for a mean with unknown 𝜎 using 𝑡.
6: Use tables or Excel to find the p-value in tests of 𝜇
7: Perform a hypothesis test for a proportion and find the p-value.

2
p-value method

• So far, we have used the critical value method to specify the rejection
criteria in terms of the test statistic (before you take a sample)
• The p-value method is an alternative way of stating the decision rule
• The p-value method requires that you express the strength of your evidence
(from your sample) against the null hypothesis in terms of a probability

3
p-value method
• The p-value answers the following question:

If the null hypothesis is true, what is the probability that we would observe
our particular value of the sample mean or one even farther away from μ0 ?

• The p-value gives us more information than a test using one particular value
of α because the observer can choose any α that is appropriate for the
problem.

4
What is a p-value

• A sample statistic is a random variable that may differ from the hypothesized value
merely by chance, so we do not expect the sample to agree exactly with H0
• The p-value is the probability of obtaining a test statistic as extreme as the one
observed, assuming that the null hypothesis is true.
• A large p-value (near 1.00) tends to support H0
• a small p-value (near 0.00) tends to contradict H0

5
Decision rule using p-values
• Compare the p-value with the chosen level of significance, 𝛼:
• If p-value < 𝜶 the sample contradicts the null hypothesis so we reject H0
• Otherwise, do not reject H0
Note: In order to calculate the p-value, we need to calculate the test statistic

• The decision rule using p-values is the same for upper tail, lower
tail and two-tailed tests
• The difference in one and two-tailed tests is how we obtain the p-value
• In two-tailed tests, we allow rejection in either the lower or upper tail, and
so the level of significance is divided between the 2 tails to establish the
rejection regions
• In one-tailed tests, the level of significance is in one tail, and there is one
rejection region
6
Whether we use the critical value approach or the p-value
approach, our decision about the null hypothesis will be the same.

7
Example: Hot chocolate (revisited)
• In addition to its core business of bagels and coffee, Bruegger's Bagels also
sells hot chocolate for the non-coffee crowd.
• Customer research shows that the ideal temperature for hot chocolate is
142°F ("hot" but not "too hot").
• A random sample of 24 cups of hot chocolate is taken at various times, and
the temperature of each cup is measured using an ordinary kitchen
thermometer that is accurate to the nearest whole degree.
• The sample mean is 141.375 with a sample standard deviation of 1.99592.
Does this sample evidence show that the true mean differs from 142 using
𝛼 = 0.10?

8
Example: Hot chocolate using p-value approach
Step 1: State the Hypotheses:
We use a two-tailed test. The null hypothesis is that the average temperature is
the desired standard
𝐻0 : μ = 142 mean temperature is correct
𝐻1 : μ ≠ 142 mean temperature is incorrect

Step 2: Specify the Decision Rule:


For 𝛼 = .10, we reject 𝐻0 if the p-value < 𝛼 =0.10

Step 3: Calculate the Test Statistic:


lj 0
𝑥−μ 141.375−142 −0.6250
𝑡calc = 𝑠 = 1.99592 = = −1.534
0.40742
𝑛 24

9
Example: Hot Chocolate using p-value approach
Using the p-value:
• We want to determine the tail area less than t = −1.534 or greater than t = +1.534.
lj 0
𝑥−μ
𝑡calc = 𝑠 ~ tn-1
𝑛

• It is easier and more precise to use Excel’s function T.DIST.2T(1.534,23) to


get the two-tailed p-value of 0.13867. The area of each tail is half that, or .06934

10
Example: Hot Chocolate
Step 4: Decision
Since p-value = 0.13867 > 𝛼 = 0.10, we do not reject the null
hypothesis

Step 5: Draw a conclusion


On the basis of this sample and at the 10% level of significance, we are
unable to reject the null hypothesis. There is insufficient evidence to
conclude that the mean temperature differs from 142.
This is the same outcome as we found using the critical value method.

11
Confidence Interval Versus Hypothesis Test
• The two-tailed test at the 10 percent level of significance is equivalent to a (two-tailed)
90 percent confidence interval.
• If the confidence interval does not contain μ0 , we reject 𝐻0 .

• For the hot chocolate, the sample mean is 141.375 with a sample standard deviation
of 1.99592, and a sample size of 24 (df=23)
• 𝑡0.05,23 = 1.714, so the 90 percent confidence interval for μ is
𝑠 1.99592
𝑥lj ± 𝑡𝑎/2 = 141.375 ± 1.714 = 141.375 ± 0.6983
𝑛 24

• Because μ =142 lies within the 90 percent confidence interval 140.677, 142.073 , we
cannot reject the hypothesis 𝐻0 : μ = 142 at 𝛼 = 0.10 in a two-tailed test.

12
Appendix D-1: Critical Values for Student's t

This table shows the t value that defines the area for each stated degrees of freedom (d.f. ).

Confidence Level Confidence Level

0.80 0.90 0.95 0.98 0.99 0.80 0.90 0.95 0.98 0.99

Upper Tail Area Upper Tail Area

d.f. 0.10 0.05 0.025 0.01 0.005 d.f. 0.10 0.05 0.025 0.01 0.005

1 3.078 6.314 12.706 31.821 63.657 36 1.306 1.688 2.028 2.434 2.719

2 1.886 2.920 4.303 6.965 9.925 37 1.305 1.687 2.026 2.431 2.715

3 1.638 2.353 3.182 4.541 5.841 38 1.304 1.686 2.024 2.429 2.712

4 1.533 2.132 2.776 3.747 4.604 39 1.304 1.685 2.023 2.426 2.708

5 1.476 2.015 2.571 3.365 4.032 40 1.303 1.684 2.021 2.423 2.704

21 1.323 1.721 2.080 2.518 2.831 80 1.292 1.664 1.990 2.374 2.639

22 1.321 1.717 2.074 2.508 2.819 85 1.292 1.663 1.988 2.371 2.635

23 1.319 1.714 2.069 2.500 2.807 90 1.291 1.662 1.987 2.368 2.632

24 1.318 1.711 2.064 2.492 2.797 95 1.291 1.661 1.985 2.366 2.629

25 1.316 1.708 2.060 2.485 2.787 100 1.290 1.660 1.984 2.364 2.626
13
Example: Is the hot chocolate too hot?
Step 1: State the Hypotheses:
An upper-tailed test would be appropriate because the objective is to determine
whether the mean temperature is greater than the desired standard.

𝐻0 : μ ≤ 142 mean temperature is not too hot


𝐻1 : μ > 142 mean temperature is too hot

Step 2: Specify the Decision Rule:


For 𝛼 = 0.10: Reject H0 if p-value of test stat < 0.10

14
Example: Hot chocolate
Step 3: Calculate the Test Statistic:
lj 0
𝑥−μ 141.375−142 −0.6250
𝑡calc = 𝑠 = 1.99592 = = −1.534
0.40742
𝑛 24

For 𝛼 = .10, for an upper-tailed test with d.f. = n − 1 = 24 − 1 = 23 , the p-value of -


1.534 = T.DIST.RT(𝑡𝑐𝑎𝑙𝑐 , 𝑑𝑓) = T.DIST.RT −1.534,23 = 0.931
Step 4: Decision
Since p-value = 0.931> 𝛼 = .10, we do not reject H0
Step 5: Draw a conclusion
On the basis of this sample and at the 10% level of significance, we are unable to
reject the null hypothesis. There is insufficient evidence to conclude that the mean
temperature is too hot (i.e. above 142).

15
Example: Is the hot chocolate too hot?
Critical value approach
Step 1: State the Hypotheses
𝐻0 : μ ≤ 142 mean temperature is not too hot
𝐻1 : μ > 142 mean temperature is too hot

Step 2: Specify the Decision Rule:


For a upper-tailed test, for a t-distn with 23 degrees of freedom, 𝑡0.1 = 1.319
For 𝛼 = .10: Reject H0 if 𝑡calc > 1.319

Step 3: Calculate the Test Statistic


lj
𝑥−μ 141.375−142 −0.6250
𝑡calc = 𝑠 0 = 1.99592 = 0.40742 = −1.534
𝑛 24

Step 4: Decision
Since, 𝑡calc = −1.534< 1.319, we do not reject H0

16
Appendix D-1: Critical Values for Student's t

This table shows the t value that defines the area for each stated degrees of freedom (d.f. ).

Confidence Level Confidence Level

0.80 0.90 0.95 0.98 0.99 0.80 0.90 0.95 0.98 0.99

Upper Tail Area Upper Tail Area

d.f. 0.10 0.05 0.025 0.01 0.005 d.f. 0.10 0.05 0.025 0.01 0.005

1 3.078 6.314 12.706 31.821 63.657 36 1.306 1.688 2.028 2.434 2.719

2 1.886 2.920 4.303 6.965 9.925 37 1.305 1.687 2.026 2.431 2.715

3 1.638 2.353 3.182 4.541 5.841 38 1.304 1.686 2.024 2.429 2.712

4 1.533 2.132 2.776 3.747 4.604 39 1.304 1.685 2.023 2.426 2.708

5 1.476 2.015 2.571 3.365 4.032 40 1.303 1.684 2.021 2.423 2.704

21 1.323 1.721 2.080 2.518 2.831 80 1.292 1.664 1.990 2.374 2.639

22 1.321 1.717 2.074 2.508 2.819 85 1.292 1.663 1.988 2.371 2.635

23 1.319 1.714 2.069 2.500 2.807 90 1.291 1.662 1.987 2.368 2.632

24 1.318 1.711 2.064 2.492 2.797 95 1.291 1.661 1.985 2.366 2.629

25 1.316 1.708 2.060 2.485 2.787 100 1.290 1.660 1.984 2.364 2.626
17
Testing a proportion

• The steps we follow for testing a hypothesis about a population proportion, π, are the
same as the ones we follow for testing a mean
• The difference is that we now calculate a sample proportion, p, to calculate the test
statistic.
• The test statistic, calculated from sample data, is the difference between the sample
proportion p and the hypothesized proportion π0 , divided by the standard error of the
proportion
𝑝 − π0 𝑝 − π0
𝑧calc = =
𝜎𝑝 π0 1 − π0
𝑛

• Recall, to assume normality of the sample proportion, p, requires n 𝛑𝟎 ≥ 10 and n (1-𝛑𝟎 ) ≥ 10

18
One tailed and two tailed tests
• For a proportion, the null hypothesis H0 states the value(s) of π0 that we will try
to reject.
• There are three possible alternative hypotheses
𝐋𝐞𝐟𝐭 − 𝐓𝐚𝐢𝐥𝐞𝐝 𝐓𝐞𝐬𝐭 𝐑𝐢𝐠𝐡𝐭 − 𝐓𝐚𝐢𝐥𝐞𝐝 𝐓𝐞𝐬𝐭
Lower − Tailed Test 𝐓𝐰𝐨 − 𝐓𝐚𝐢𝐥𝐞𝐝 𝐓𝐞𝐬𝐭 Upper − Tailed Test

𝐻0 : π ≥ π0 𝐻0 : π = π0 𝐻0 : π ≤ π0
𝐻1 : π < π0 𝐻1 : π ≠ π0 𝐻1 : π > π0

• The direction of the test is indicated by which way the inequality symbol points in 𝐻1
< indicates a left–tailed test
≠ indicates a two–tailed test
> Indicates a right–tailed test
19
Example: Returns policy
• The Retail Equation, a Brunswick-based company, licenses software that tracks
a shopper's record of bringing back items and alerts the retailer when a
customer's behavior is deemed risky.
• The goal is to reduce the number of fraudulent returns, which should reduce the
proportion of returns overall.
• In brick-and-mortar department stores, the historical return rate for
merchandise is 13.0 percent.
• At one department store (Myers in the CBD) , after implementing the new
software, there were 22 returns in a sample of 250 purchases.
• Does this sample indicate that the true return rate is below the historical return
rate at α = 0.05?
20
Example: Returns policy
Does this sample indicate that the true return rate is below the historical return rate at
α = 0.05?

Step 1: State the Hypotheses:


𝐻0 : π ≥ 0.13 return rate is the same or greater than the historical rate
𝐻1 : π < 0.13 return rate has fallen below the historical rate

Check: n 𝜋0=250(0.13 )=32.5>10 and n(1 − 𝜋0)=250(1-0.13 )=217.5>10 so OK to use z distribution

Step 2: Specify the Decision Rule:


For α = .05 in a left-tailed test, the critical value is
𝑧.05 = −1.645 (𝐴𝑝𝑝𝑒𝑛𝑑𝑖𝑥 𝐶 − 1: 𝑆𝑡𝑎𝑛𝑑𝑎𝑟𝑑 𝑁𝑜𝑟𝑚𝑎𝑙 𝐷𝑖𝑠𝑡𝑟𝑖𝑏𝑢𝑡𝑖𝑜𝑛 𝐴𝑟𝑒𝑎𝑠)
Decision rule: Reject 𝑯𝟎 if zcalc< -1.645

21
Appendix C-1: Standard Normal Distribution Areas

This table shows the normal area between 0 and z .

z 0.00 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09
0.0 0.0000 0.0040 0.0080 0.0120 0.0160 0.0199 0.0239 0.0279 0.0319 0.0359
0.1 0.0398 0.0438 0.0478 0.0517 0.0557 0.0596 0.0636 0.0675 0.0714 0.0753
0.2 0.0793 0.0832 0.0871 0.0910 0.0948 0.0987 0.1026 0.1064 0.1103 0.1141
0.3 0.1179 0.1217 0.1255 0.1293 0.1331 0.1368 0.1406 0.1443 0.1480 0.1517
0.4 0.1554 0.1591 0.1628 0.1664 0.1700 0.1736 0.1772 0.1808 0.1844 0.1879
0.5 0.1915 0.1950 0.1985 0.2019 0.2054 0.2088 0.2123 0.2157 0.2190 0.2224
0.6 0.2257 0.2291 0.2324 0.2357 0.2389 0.2422 0.2454 0.2486 0.2517 0.2549
0.7 0.2580 0.2611 0.2642 0.2673 0.2704 0.2734 0.2764 0.2794 0.2823 0.2852
0.8 0.2881 0.2910 0.2939 0.2967 0.2995 0.3023 0.3051 0.3078 0.3106 0.3133
0.9 0.3159 0.3186 0.3212 0.3238 0.3264 0.3289 0.3315 0.3340 0.3365 0.3389
1.0 0.3413 0.3438 0.3461 0.3485 0.3508 0.3531 0.3554 0.3577 0.3599 0.3621
1.1 0.3643 0.3665 0.3686 0.3708 0.3729 0.3749 0.3770 0.3790 0.3810 0.3830
1.2 0.3849 0.3869 0.3888 0.3907 0.3925 0.3944 0.3962 0.3980 0.3997 0.4015
1.3 0.4032 0.4049 0.4066 0.4082 0.4099 0.4115 0.4131 0.4147 0.4162 0.4177
1.4 0.4192 0.4207 0.4222 0.4236 0.4251 0.4265 0.4279 0.4292 0.4306 0.4319
1.5 0.4332 0.4345 0.4357 0.4370 0.4382 0.4394 0.4406 0.4418 0.4429 0.4441
1.6 0.4452 0.4463 0.4474 0.4484 0.4495 0.4505 0.4515 0.4525 0.4535 0.4545
1.7 0.4554 0.4564 0.4573 0.4582 0.4591 0.4599 0.4608 0.4616 0.4625 0.4633
1.8 0.4641 0.4649 0.4656 0.4664 0.4671 0.4678 0.4686 0.4693 0.4699 0.4706

22
Example: Returns policy

Step 3: Calculate the Test Statistic:


• The test statistic is the difference between the sample proportion,
𝑥 22
𝑝= = = .088, and the hypothesized parameter, 𝜋0 divided by the
𝑛 250

standard error of p:

𝑝 − π0 .088 − .13 −.042


𝑧calc = = = = −1.975
π0 1 − π0 .13 1 − .13 .02127
𝑛 250

23
Example: Returns policy
Step 4: Make the Decision:
Because the test statistic
(𝑧calc = −1.975) falls in the left-tail
rejection region, we reject H0

Step 5: Draw a conclusion :


On the basis of this sample and at the 5% level of significance, we reject the null hypothesis that the
return rate is the same or greater than the historical rate.
The rate of returns seems to be reduced, so the store might want to try using the software at its
other locations.
24
Example: Returns policy using the p-value approach
1. 𝐻0 : π ≥ .13 return rate is the same or greater than the historical rate
𝐻1 : π < .13 return rate has fallen below the historical rate
2. Decision rule is Reject H0 if p-value < α = 0.05
3. Test statistic 𝑧calc = −1.975, the p-value can be obtained from Excel’s
cumulative standard normal =NORM.S.DIST(−1.975,1)=.02413
4. Since the p-value= 0.02413 < 0.05, reject H0
5. On the basis of this sample and at the 5% level of
significance, there is sufficient evidence to conclude
that the returns rate is smaller than the historical rate.

25
What we covered today
• What is a p-value
• Decision rules using p-values
• Two-sided hypothesis tests
• One-sided hypothesis test
• Confidence Interval Versus Hypothesis Test
• Testing a proportion

26

You might also like