Professional Documents
Culture Documents
Hypothesis Testing 2
{ CE 21. Engineering Statistics
1
3/16/2011
Summary:
Let X1,…,Xn be a large (n>30) sample from a population with
mean µ and standard deviation σ.
To test a null hypothesis of the form:
H0: µ ≤µ0, H0:µ ≥µ0, H0: µ =µ0:
𝑋−𝜇0
- Compute the z-score: 𝑧 = .
𝜎/ 𝑛
If 𝜎 is unknown it can be approximated with s.
- Compute the P-value. The P-value is an area under the
normal curve, which depends on the alternate hypothesis as
follows:
Alternate Hypothesis P-value
H1: µ > µ0 Area to the right of z
H1: µ < µ0 Area to the left of z
H1: µ ≠ µ0 Sum of the areas in the tails cut off by z and -z
2
3/16/2011
The Relationship
Between Hypothesis
Tests and Confidence
Intervals
3
3/16/2011
Quiz:
1. For which value is the null hypothesis more plausible:
P=0.5 or P=0.05?
2. If P=0.01, which is the best conclusion?
a. H0 is definitely false.
b. H0 is definitely true.
c. There is a 1% probability that H0 is true.
d. H0 might be true, but it’s unlikely.
e. H0 might be false, but it’s unlikely.
f. H0 is plausible.
3. True or False: If P=0.02, then
a. The result is statistically significant at the 5% level.
b. The result is statistically significant at the 1% level.
c. The null hypothesis is rejected at the 5% level.
d. The null hypothesis is rejected at the 1% level.
4
3/16/2011
𝜇=𝑝
𝑝 1−𝑝
𝜎2 =
𝑛
This test requires that the sample proportion be approximately
normally distributed.
This assumption will be justified when both np0 > 10 and n(1-p0) > 10.
5
3/16/2011
Example 7:
A supplier of semiconductor wafers claims
that of all the wafers he supplies, no more than
10% are defective. A sample of 400 wafers is
tested and 50 of them, or 12.5%, are defective.
Can we conclude that the claim is false?
6
3/16/2011
Example 8:
The article “Refinement of Gravimetric Geoid
Using GPS and Leveling Data” presents a
method for measuring orthometric heights
above sea level. For a sample of 1225 baselines,
926 gave results that were within the class C
spirit leveling tolerance limits. Can we conclude
that this method produces results within the
tolerance limits more than 75% of the time?
Summary:
Let X be the number of successes in n independent
Bernoulli trials, each with success probability p; in other
words, let X~Bin (n,p).
To test a null hypothesis, assuming that both np0 and
n(1-p0) are greater than 10:
7
3/16/2011
8
3/16/2011
9
3/16/2011
10
3/16/2011
Example 11:
An engineer claims that a new type of power
supply for home computers lasts longer than
the old type. Independent random samples of
75 each of the two types are chosen, and the
sample means and standard deviations of their
lifetimes are computed:
New: 𝑋= 4387 h s1=252 h
Old: 𝑋= 4260 h s2=231 h
11
3/16/2011
READING ASSIGNMENT:
Tests for the difference between two proportions
(pages 425-428)
Tests with paired data (page 439- 441)
12
3/16/2011
Schedule
March 16 – Chi Square Tests
March 18- F Tests, Power
March 23- Third Long Exam, w/ cheat sheet (Wednesday)
4-6 PM
Conflict: 25 1 PM
April 1- Final Presentation (Friday)
13
3/16/2011
Nominal variables:
Variables with no inherent order or ranking sequence,
-e.g. numbers used as names (group 1, group 2...), gender,
Ordinal variables:
Variables with an ordered series,
- e.g. "greatly dislike, moderately dislike, indifferent,
moderately like, greatly like".
***Numbers assigned to such variables indicate rank order only -
the "distance" between the numbers has no meaning.
14
3/16/2011
Example:
Of 120 male and 100 female applicants to university, 90 male and 40 female had
work experience.
Does the gender of an applicant to university correspond to whether or not they
have prior work experience?
15
3/16/2011
Examples
16
3/16/2011
Example:
A gambler wants to test a die to see if it is not
fair.
H0: Die is fair. (p01=…p06=1/6)
He rolls the die 600 times and obtains the ff.
results:
Category Observed Expected
1 115 100
2 97 100
3 91 100
4 101 100
5 110 100
6 86 100
Total 600 600
17
3/16/2011
P-value:
Check if all expected values are ≥ 5.
reject H0.
18
3/16/2011
Example 1:
Rivets are manufactured for a certain purpose. The
length specification is 1.20-1.30 cm. It is thought that
90% of the rivets manufactured meet the specification,
while 5% are too short, and 5% are too long.
19
3/16/2011
Example:
Four machines manufacture cylindrical steel pins. The pins are
subject to a diameter specification. A pin may meet the
specification, or it may be too thin or too thick. Pins are sampled
for each machine, and the number of pins in each category is
counted. The results are shown in the contingency table:
Machine 3 12 79 9 100
Machine 4 10 60 10 80
Example:
Four machines manufacture cylindrical steel pins. The pins are
subject to a diameter specification. A pin may meet the
specification, or it may be too thin or too thick. Pins are sampled
for each machine, and the number of pins in each category is
counted. The results are shown in the contingency table:
Machine 3 12 79 9 100
Machine 4 10 60 10 80
20
3/16/2011
21
3/16/2011
22
3/16/2011
Example 3:
Cylindrical steel pins are subject to a length and
diameter specification. With respect to length, a pin
may meet the specification, or it may be too long or
too short.
23
3/16/2011
Diameter
Length Too thin OK Too Total
thick
Too 13 117 4 134
Short
OK 62 664 80 806
Too 5 68 8 81
Long
Total 80 849 92 1021
Example 4:
For the given table of observed values,
Construct the corresponding table of expected
values.
If appropriate, perform the chi-square test for the
null hypothesis that the row and column outcomes
are independent. If not appropriate, explain why.
Observed Values
1 2 3
A 15 10 12
B 3 11 11
C 9 14 12
24
3/16/2011
End.
25