0% found this document useful (0 votes)
12 views

Lecture 4

Uploaded by

Anikk Hassan
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

Lecture 4

Uploaded by

Anikk Hassan
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 79

One Sample Tests of Hypothesis

McGraw-Hill/Irwin ©The McGraw-Hill Companies, Inc. 2008


GOALS

 Define a hypothesis and hypothesis testing.


 Describe the five-step hypothesis-testing procedure.
 Distinguish between a one-tailed and a two-tailed
test of hypothesis.
 Conduct a test of hypothesis about a population
mean.
 Conduct a test of hypothesis about a population
proportion.
 Define Type I and Type II errors.
 Compute the probability of a Type II error.

2
What is a Hypothesis?

A Hypothesis is a statement about the value of a population parameter


developed for the purpose of testing. Examples of hypotheses made about
a population parameter are:
– The mean monthly income for systems analysts is $3,625.
– Twenty percent of all customers at Bovine’s Chop House return for another meal within a month.

3
4
What is Hypothesis Testing?

Hypothesis testing is a procedure, based


on sample evidence and probability
theory, used to determine whether the
hypothesis is a reasonable statement
and should not be rejected, or is
unreasonable and should be rejected.

5
6
7
8
9
10
11
12
Hypothesis Testing Steps

13
Important Things to Remember about H0 and H1

 H0: null hypothesis and H1: alternate hypothesis


 H0 and H1 are mutually exclusive and collectively exhaustive
 H0 is always presumed to be true
 H1 has the burden of proof
 A random sample (n) is used to “reject H0”
 If we conclude 'do not reject H0', this does not necessarily
mean that the null hypothesis is true, it only suggests that there
is not sufficient evidence to reject H0; rejecting the null
hypothesis then, suggests that the alternative hypothesis may
be true.
 Equality is always part of H0 (e.g. “=” , “≥” , “≤”).
 “≠” “<” and “>” always part of H1

14
15
16
17
18
19
20
21
22
23
24
25
26
Left-tail or Right-tail Test?
• The direction of the test involving
claims that use the words “has
improved”, “is better than”, and the like Inequality
Keywords Part of:
will depend upon the variable being Symbol

measured. Larger (or more) than > H1

• For instance, if the variable involves Smaller (or less) < H1

time for a certain medication to take No more than  H0

effect, the words “better” “improve” or At least ≥ H0

more effective” are translated as “<” Has increased > H1

(less than, i.e. faster relief). Is there difference? ≠ H1

• On the other hand, if the variable Has not changed = H0

refers to a test score, then the words Has “improved”, “is better
than”. “is more effective”
See right H1

“better” “improve” or more effective”


are translated as “>” (greater than, i.e.
higher test scores)

27
One-tail vs. Two-tail Test

28
Hypothesis Setups for Testing a Mean ()

29
Hypothesis Setups for Testing a
Proportion ()

30
Testing for a Population Mean with a
Known Population Standard Deviation- Example

Jamestown Steel Company


manufactures and assembles desks
and other office equipment at
several plants in western New York
State. The weekly production of the
Model A325 desk at the Fredonia
Plant follows the normal probability
distribution with a mean of 200 and
a standard deviation of 16.
Recently, because of market
expansion, new production
methods have been introduced and
new employees hired. The vice
president of manufacturing would
like to investigate whether there has
been a change in the weekly
production of the Model A325 desk.

31
Testing for a Population Mean with a
Known Population Standard Deviation- Example

Step 1: State the null hypothesis and the alternate


hypothesis.
H0:  = 200
H1:  ≠ 200
(note: keyword in the problem “has changed”)

Step 2: Select the level of significance.


α = 0.01 as stated in the problem

Step 3: Select the test statistic.


Use Z-distribution since σ is known

32
Testing for a Population Mean with a
Known Population Standard Deviation- Example

Step 4: Formulate the decision rule.


Reject H0 if |Z| > Z/2
Z  Z / 2
X 
 Z / 2
/ n
203.5  200
 Z .01/ 2
16 / 50
1.55 is not  2.58

Step 5: Make a decision and interpret the result.


Because 1.55 does not fall in the rejection region, H0 is not
rejected. We conclude that the population mean is not different from
200. So we would report to the vice president of manufacturing that the
sample evidence does not show that the production rate at the Fredonia
Plant has changed from 200 per week.
33
Testing for a Population Mean with a Known
Population Standard Deviation- Another Example

Suppose in the previous problem the vice


president wants to know whether there has
been an increase in the number of units
assembled. To put it another way, can we
conclude, because of the improved
production methods, that the mean number
of desks assembled in the last 50 weeks was
more than 200?
Recall: σ=16, n=200, α=.01

34
Testing for a Population Mean with a Known
Population Standard Deviation- Example

Step 1: State the null hypothesis and the alternate


hypothesis.
H0:  ≤ 200
H1:  > 200
(note: keyword in the problem “an increase”)

Step 2: Select the level of significance.


α = 0.01 as stated in the problem

Step 3: Select the test statistic.


Use Z-distribution since σ is known

35
Testing for a Population Mean with a Known
Population Standard Deviation- Example

Step 4: Formulate the decision rule.


Reject H0 if Z > Z

Step 5: Make a decision and interpret the result.


Because 1.55 does not fall in the rejection region, H0 is not rejected.
We conclude that the average number of desks assembled in the last
50 weeks is not more than 200

36
p-Value in Hypothesis Testing

 p-VALUE is the probability of observing a sample


value as extreme as, or more extreme than, the
value observed, given that the null hypothesis is true.

 In testing a hypothesis, we can also compare the p-


value to with the significance level ().

 If the p-value < significance level, H0 is rejected, else


H0 is not rejected.

37
p-Value in Hypothesis Testing - Example

Recall the last problem where the


hypothesis and decision rules
were set up as:
H0:  ≤ 200
H1:  > 200
Reject H0 if Z > Z
where Z = 1.55 and Z
=2.33

Reject H0 if p-value < 


0.0606 is not < 0.01

Conclude: Fail to reject H0

38
What does it mean when p-value < ?

(a) .10, we have some evidence that H0 is not true.

(b) .05, we have strong evidence that H0 is not true.

(c) .01, we have very strong evidence that H0 is not true.

(d) .001, we have extremely strong evidence that H0 is not


true.

39
Testing for the Population Mean: Population
Standard Deviation Unknown

 When the population standard deviation (σ) is


unknown, the sample standard deviation (s) is used in
its place
 The t-distribution is used as test statistic, which is
computed using the formula:

40
Testing for the Population Mean: Population
Standard Deviation Unknown - Example

The McFarland Insurance Company Claims Department reports the mean


cost to process a claim is $60. An industry comparison showed this
amount to be larger than most other insurance companies, so the
company instituted cost-cutting measures. To evaluate the effect of
the cost-cutting measures, the Supervisor of the Claims Department
selected a random sample of 26 claims processed last month. The
sample information is reported below.
At the .01 significance level is it reasonable a claim is now less than $60?

41
Testing for a Population Mean with a
Known Population Standard Deviation- Example

Step 1: State the null hypothesis and the alternate


hypothesis.
H0:  ≥ $60
H1:  < $60
(note: keyword in the problem “now less than”)

Step 2: Select the level of significance.


α = 0.01 as stated in the problem

Step 3: Select the test statistic.


Use t-distribution since σ is unknown

42
t-Distribution Table (portion)

43
Testing for a Population Mean with a
Known Population Standard Deviation- Example

Step 4: Formulate the decision rule.


Reject H0 if t < -t,n-1

Step 5: Make a decision and interpret the result.


Because -1.818 does not fall in the rejection region, H0 is not rejected at
the .01 significance level. We have not demonstrated that the cost-cutting
measures reduced the mean cost per claim to less than $60. The difference
of $3.58 ($56.42 - $60) between the sample mean and the population mean
could be due to sampling error.
44
Testing for a Population Mean with an Unknown
Population Standard Deviation- Example

The current rate for producing 5 amp fuses at Neary


Electric Co. is 250 per hour. A new machine has
been purchased and installed that, according to the
supplier, will increase the production rate. A sample
of 10 randomly selected hours from last month
revealed the mean hourly production on the new
machine was 256 units, with a sample standard
deviation of 6 per hour.

At the .05 significance level can Neary conclude that


the new machine is faster?

45
Testing for a Population Mean with a
Known Population Standard Deviation- Example continued

Step 1: State the null and the alternate hypothesis.


H0: µ ≤ 250; H1: µ > 250

Step 2: Select the level of significance.


It is .05.

Step 3: Find a test statistic. Use the t distribution


because the population standard deviation is not
known and the sample size is less than 30.

46
Testing for a Population Mean with a
Known Population Standard Deviation- Example continued

Step 4: State the decision rule.


There are 10 – 1 = 9 degrees of freedom. The null
hypothesis is rejected if t > 1.833.

X  256  250
t   3.162
s n 6 10

Step 5: Make a decision and interpret the results.


The null hypothesis is rejected. The mean number produced is
more than 250 per hour.

47
Tests Concerning Proportion

 A Proportion is the fraction or percentage that indicates the part of


the population or sample having a particular trait of interest.
 The sample proportion is denoted by p and is found by x/n
 The test statistic is computed as follows:

48
Assumptions in Testing a Population Proportion
using the z-Distribution

 A random sample is chosen from the population.


 It is assumed that the binomial assumptions discussed in
Chapter 6 are met:
(1) the sample data collected are the result of counts;
(2) the outcome of an experiment is classified into one of two
mutually exclusive categories—a “success” or a “failure”;
(3) the probability of a success is the same for each trial; and
(4) the trials are independent
 The test we will conduct shortly is appropriate when both n
and n(1-  ) are at least 5.
 When the above conditions are met, the normal distribution can
be used as an approximation to the binomial distribution

49
Test Statistic for Testing a Single
Population Proportion

Hypothesized
population proportion
Sample proportion

p 
z
 (1   )
n

Sample size

50
Test Statistic for Testing a Single
Population Proportion - Example

Suppose prior elections in a certain state indicated


it is necessary for a candidate for governor to
receive at least 80 percent of the vote in the
northern section of the state to be elected. The
incumbent governor is interested in assessing
his chances of returning to office and plans to
conduct a survey of 2,000 registered voters in
the northern section of the state. Using the
hypothesis-testing procedure, assess the
governor’s chances of reelection.

51
Test Statistic for Testing a Single
Population Proportion - Example

Step 1: State the null hypothesis and the alternate


hypothesis.
H0:  ≥ .80
H1:  < .80
(note: keyword in the problem “at least”)

Step 2: Select the level of significance.


α = 0.01 as stated in the problem

Step 3: Select the test statistic.


Use Z-distribution since the assumptions are met
and n and n(1-) ≥ 5

52
Testing for a Population Proportion - Example

Step 4: Formulate the decision rule.


Reject H0 if Z <-Z

Step 5: Make a decision and interpret the result.


The computed value of z (2.80) is in the rejection region, so the null hypothesis is rejected
at the .05 level. The difference of 2.5 percentage points between the sample percent (77.5
percent) and the hypothesized population percent (80) is statistically significant. The
evidence at this point does not support the claim that the incumbent governor will return to
the governor’s mansion for another four years.
53
Two-sample Tests of Hypothesis

McGraw-Hill/Irwin ©The McGraw-Hill Companies, Inc. 2008


GOALS

 Conduct a test of a hypothesis about the difference


between two independent population means.
 Conduct a test of a hypothesis about the difference
between two population proportions.
 Conduct a test of a hypothesis about the mean
difference between paired or dependent
observations.
 Understand the difference between dependent and
independent samples.

55
Comparing two populations – Some
Examples

 Is there a difference in the mean value of residential real


estate sold by male agents and female agents in south
Florida?
 Is there a difference in the mean number of defects
produced on the day and the afternoon shifts at Kimble
Products?
 Is there a difference in the mean number of days absent
between young workers (under 21 years of age) and older
workers (more than 60 years of age) in the fast-food
industry?
 Is there is a difference in the proportion of Ohio State
University graduates and University of Cincinnati graduates
who pass the state Certified Public Accountant Examination
on their first attempt?
 Is there an increase in the production rate if music is piped
into the production area?

56
Comparing Two Population Means

 No assumptions about the shape of the populations are


required.
 The samples are from independent populations.
 The formula for computing the value of z is:

Use if sample sizes  30 Use if sample sizes  30


or if  1 and  2 are known and if  1 and  2 are unknown

X1  X 2 X1  X 2
z z
 12  22 s12 s22


n1 n2 n1 n2

57
EXAMPLE 1

The U-Scan facility was recently installed at the Byrne


Road Food-Town location. The store manager would
like to know if the mean checkout time using the
standard checkout method is longer than using the U-
Scan. She gathered the following sample information.
The time is measured from when the customer enters
the line until their bags are in the cart. Hence the time
includes both waiting in line and checking out.

58
EXAMPLE 1 continued

Step 1: State the null and alternate hypotheses.


H0: µS ≤ µU
H 1 : µS > µ U

Step 2: State the level of significance.


The .01 significance level is stated in the problem.

Step 3: Find the appropriate test statistic.


Because both samples are more than 30, we can use z-distribution
as the test statistic.

59
Example 1 continued

Step 4: State the decision rule.


Reject H0 if Z > Z
Z > 2.33

60
Example 1 continued

Step 5: Compute the value of z and make a decision

Xs  Xu
z
 s2  u2

ns nu
5.5  5.3
 The computed value of 3.13 is larger than the
2 2
0.40 0.30 critical value of 2.33. Our decision is to reject the
 null hypothesis. The difference of .20 minutes
50 100 between the mean checkout time using the
standard method is too large to have occurred by
0.2
  3.13 chance. We conclude the U-Scan method is
0.064 faster.

61
Comparing Population Means with Unknown
Population Standard Deviations (the Pooled t-test)

The t distribution is used as the test statistic if one


or more of the samples have less than 30
observations. The required assumptions are:
1. Both populations must follow the normal
distribution.
2. The populations must have equal standard
deviations.
3. The samples are from independent populations.

62
Comparing Population Means with Unequal
Population Standard Deviations

If it is not reasonable to assume the


population standard deviations are
equal, then we compute the t-
statistic shown on the right.
The sample standard deviations s1 and
s2 are used in place of the
respective population standard
deviations.
In addition, the degrees of freedom are
adjusted downward by a rather
complex approximation formula.
The effect is to reduce the number
of degrees of freedom in the test,
which will require a larger value of
the test statistic to reject the null
hypothesis.

63
Comparing Population Means with Unequal
Population Standard Deviations - Example

Personnel in a consumer testing laboratory are evaluating the absorbency of


paper towels. They wish to compare a set of store brand towels to a similar
group of name brand ones. For each brand they dip a ply of the paper into a
tub of fluid, allow the paper to drain back into the vat for two minutes, and
then evaluate the amount of liquid the paper has taken up from the vat. A
random sample of 9 store brand paper towels absorbed the following
amounts of liquid in milliliters.

8 8 3 1 9 7 5 5 12

An independent random sample of 12 name brand towels absorbed the


following amounts of liquid in milliliters:

12 11 10 6 8 9 9 10 11 9 8 10

Use the .10 significance level and test if there is a difference in the mean
amount of liquid absorbed by the two types of paper towels.
64
Comparing Population Means with Unequal
Population Standard Deviations - Example

The following dot plot provided by MINITAB shows the


variances to be unequal.

65
Comparing Population Means with Unequal
Population Standard Deviations - Example

Step 1: State the null and alternate hypotheses.


H0: 1 = 2
H1: 1 ≠ 2

Step 2: State the level of significance.


The .10 significance level is stated in the problem.

Step 3: Find the appropriate test statistic.


We will use unequal variances t-test

66
Comparing Population Means with Unequal
Population Standard Deviations - Example

Step 4: State the decision rule.


Reject H0 if
t > t/2d.f. or t < - t/2,d.f.
t > t.05,10 or t < - t.05, 10
t > 1.812 or t < -1.812

Step 5: Compute the value of t and


make a decision

The computed value of t is less than the lower critical value, so our
decision is to reject the null hypothesis. We conclude that the
mean absorption rate for the two towels is not the same.

67
Comparing Means of Two or More Populations

 The Null Hypothesis is that the population means


are the same. The Alternative Hypothesis is that
at least one of the means is different.
 The Test Statistic is the F distribution.
 The Decision rule is to reject the null hypothesis
if F (computed) is greater than F (table) with
numerator and denominator degrees of freedom.
 Hypothesis Setup and Decision Rule:
H0: µ1 = µ2 =…= µk
H1: The means are not all equal
Reject H0 if F > F,k-1,n-k

68
Analysis of Variance – F statistic

 If there are k populations being sampled, the numerator


degrees of freedom is k – 1.
 If there are a total of n observations the denominator degrees of
freedom is n – k.
 The test statistic is computed by:

SST k  1
F
SSE n  k 

69
Comparing Means of Two or More
Populations – Illustrative Example

Joyce Kuhlman manages a regional financial center. She wishes to


compare the productivity, as measured by the number of customers
served, among three employees. Four days are randomly selected and
the number of customers served by each employee is recorded. The
results are:

70
Comparing Means of Two or More
Populations – Illustrative Example

71
Comparing Means of Two or More
Populations – Example

Recently a group of four major carriers


joined in hiring Brunner Marketing
Research, Inc., to survey recent
passengers regarding their level of
satisfaction with a recent flight.
The survey included questions on
ticketing, boarding, in-flight
service, baggage handling, pilot
communication, and so forth.
Twenty-five questions offered a
range of possible answers:
excellent, good, fair, or poor. A
response of excellent was given a
score of 4, good a 3, fair a 2, and
poor a 1. These responses were
then totaled, so the total score
was an indication of the Is there a difference in the mean
satisfaction with the flight. Brunner satisfaction level among the four
Marketing Research, Inc., airlines?
randomly selected and surveyed Use the .01 significance level.
passengers from the four airlines.

72
Comparing Means of Two or More
Populations – Example

Step 1: State the null and alternate hypotheses.


H0: µE = µA = µT = µO
H1: The means are not all equal
Reject H0 if F > F,k-1,n-k

Step 2: State the level of significance.


The .01 significance level is stated in the problem.

Step 3: Find the appropriate test statistic.


Because we are comparing means of more than
two groups, use the F statistic

73
Comparing Means of Two or More
Populations – Example

Step 4: State the decision rule.


Reject H0 if F > F,k-1,n-k
F > F01,4-1,22-4
F > F01,3,18
F > 5.801

74
Comparing Means of Two or More
Populations – Example

Step 5: Compute the value of F and make a decision

75
Comparing Means of Two or More
Populations – Example

76
Computing SS Total and SSE

77
Computing SST

The computed value of F is 8.99, which is greater than the critical value of 5.09,
so the null hypothesis is rejected.
Conclusion: The population means are not all equal. The mean scores are not
the same for the four airlines; at this point we can only conclude there is a
difference in the treatment means. We cannot determine which treatment groups
differ or how many treatment groups differ.
78
Excel

79

You might also like