Hypothesis Testing & Excel Lab

Download Report

Transcript Hypothesis Testing & Excel Lab

IENG 486 - Lecture 06
Hypothesis Testing & Excel Lab
7/17/2015
IENG 486 Statistical Quality & Process
Control
1
Assignment:
 Preparation:


Print Hypothesis Test Tables from Materials page
Have this available in class …or exam!
 Reading:

Chapter 4:

4.1.1 through 4.3.4; (skip 4.3.5); 4.3.6 through 4.4.3; (skip rest)
 HW 2:

CH 4: # 1a,b; 5a,c; 9a,c,f; 11a,b,d,g; 17a,b; 18,
21a,c; 22* *uses Fig.4.7, p. 126
7/17/2015
IENG 486 Statistical Quality & Process Control
2
Relationship with Hypothesis Tests
 Assuming that our process is Normally Distributed and
centered at the mean, how far apart should our specification
limits be to obtain 99. 5% yield?
 Proportion defective will be 1 – .995 = .005, and if the
process is centered, half of those defectives will occur on
the right tail (.0025), and half on the left tail.

To get 1 – .0025 = 99.75% yield before the right tail
requires the upper specification limit to be set at
 + 2.81.
7/17/2015
TM 720: Statistical Process Control
3
7/17/2015
TM 720: Statistical Process Control
4
Relationship with Hypothesis Tests
 Assuming that our process is Normally Distributed and centered at
the mean, how far apart should our specification limits be to obtain
99. 5% yield?
 Proportion defective will be 1 – .995 = .005, and if the process
is centered, half of those defectives will occur on the right tail
(.0025), and half on the left tail.

To get 1 – .0025 = 99.75% yield before the right tail requires
the upper specification limit to be set at + 2.81.

By symmetry, the remaining .25% defective should occur at
the left side, with the lower specification limit set at  – 2.81

If we specify our process in this manner and made a lot of
parts, we would only produce bad parts .5% of the time.
7/17/2015
IENG 486 Statistical Quality & Process Control
5
Hypothesis Tests
 An Hypothesis is a guess about a situation, that can
be tested and can be either true or false.
 The Null Hypothesis has a symbol H , and is
0
always the default situation that must be proven
wrong beyond a reasonable doubt.

The Alternative Hypothesis is denoted by the
symbol HA and can be thought of as the opposite of
the Null Hypothesis - it can also be either true or
false, but it is always false when H0 is true and
vice-versa.
7/17/2015
IENG 486 Statistical Quality & Process Control
6
Hypothesis Testing Errors

Type I Errors occur when a test statistic leads us to
reject the Null Hypothesis when the Null Hypothesis
is true in reality.
 The
chance of making a Type I Error is estimated by
the parameter  (or level of significance), which
quantifies the reasonable doubt.

Type II Errors occur when a test statistic leads us to
fail to reject the Null Hypothesis when the Null
Hypothesis is actually false in reality.
 The
probability of making a Type II Error is estimated
by the parameter .
7/17/2015
IENG 486 Statistical Quality & Process Control
7
Testing Example
 Single Sample, Two-Sided t-Test:

H0: µ = µ0 versus HA: µ  µ0

Test Statistic: t  n  x   0  ,
s

Critical Region: reject H0 if |t| > t/2,n-1

P-Value: 2 x P(X  |t|), where the random variable
X has a t-distribution with n _ 1 degrees of freedom
7/17/2015
IENG 486 Statistical Quality & Process Control
8
Hypothesis Testing
H0:  =  0 versus HA:    0
P-value = P(X-|t|) + P(X|t|)
tn-1 distribution
Critical Region: if our
test statistic value falls
into the region (shown
in orange), we reject H0
and accept HA
-|t|
7/17/2015
0
IENG 486 Statistical Quality & Process Control
|t|
9
Types of Hypothesis Tests
Hypothesis Tests & Rejection Criteria

θ θ0
0


2
2
θ θ0
0

θ0 θ
0
θ0 θ
One-Sided Test
Statistic < Rejection Criterion
Two-Sided Test
Statistic < -½ Rejection Criterion
or
Statistic > +½ Rejection Criterion
One-Sided Test
Statistic > Rejection Criterion
H0: θ ≥ θ0
HA: θ < θ0
H0: θ = θ0
HA: θ ≠ θ0
H0: θ ≤ θ0
HA: θ > θ0
7/17/2015
IENG 486 Statistical Quality & Process Control
10
Hypothesis Testing Steps
1. State the null hypothesis (H0) from one of the alternatives:
that the test statistic q  q0 , q ≥ q0 , or q ≤ q0 .
2. Choose the alternative hypothesis (HA) from the alternatives:
q  q0 , q < q0 , or q > q0 . (Respectively!)
3. Choose a significance level of the test (.
4. Select the appropriate test statistic and establish a critical region (q0).
(If the decision is to be based on a P-value, it is not necessary to have a critical
region)
5. Compute the value of the test statistic (q) from the sample data.
6. Decision: Reject H0 if the test statistic has a value in the critical
region (or if the computed P-value is less than or equal to the desired
significance level ); otherwise, do not reject H0.
7/17/2015
IENG 486 Statistical Quality & Process Control
11
Hypothesis Testing
 Significance Level of a Hypothesis Test:
A hypothesis test with a significance level or size  rejects the null
hypothesis H0 if a p-value smaller than  is obtained, and accepts the
null hypothesis H0 if a p-value larger than  is obtained. In this case,
the probability of a Type I error (the probability of rejecting the null
hypothesis when it is true) is equal to .
Test Conclusion
True Situation
7/17/2015
H0 is True
H0 is False
H0 is True
CORRECT
Type II Error ()
H0 is
False
Type I Error
()
CORRECT
IENG 486 Statistical Quality & Process Control
12
Hypothesis Testing
 P-Value:
One way to think of the P-value for a particular H0 is: given the
observed data set, what is the probability of obtaining this
data set or worse when the null hypothesis is true. A “worse”
data set is one which is less similar to the distribution for the null
hypothesis.
P-Value
0 0.01
H0
not plausible
7/17/2015
1
0.10
Intermediate
area
H0
plausible
IENG 486 Statistical Quality & Process Control
13
Statistics and Sampling
 Objective of statistical inference:
 Draw conclusions/make decisions about a population based
on a sample selected from the population
 Random sample – a sample, x1, x2, …, xn , selected so that
observations are independently and identically distributed (iid).
 Statistic – function of the sample data
 Quantities computed from observations in sample and used to
make statistical inferences
1 n
 e.g.
x
x measures central tendency
n
7/17/2015

i 1
i
IENG 486 Statistical Quality & Process Control
14
Sampling Distribution
 Sampling Distribution – Probability distribution of a
statistic
 If we know the distribution of the population from which
sample was taken,
 we can often determine the distribution of various
statistics computed from a sample
7/17/2015
IENG 486 Statistical Quality & Process Control
15
e.g. Sampling Distribution of the
Average from the
Normal Distribution
 Take a random sample, x1, x2, …, xn, from a normal population with
mean  and standard deviation  , i.e., x ~ N (  ,  )
 Compute the sample average x
 Then x will be normally distributed with mean
 That is
7/17/2015
 and std deviation

n
  
x ~ N ( , x )  N   ,

n

IENG 486 Statistical Quality & Process Control
16
Ex. Sampling Distribution
of x
 When a process is operating properly, the mean density of a liquid
is 10 with standard deviation 5. Five observations are taken and
the average density is 15.
 What is the distribution of the sample average?
 r.v. x = density of liquid
Ans: since the samples come from a normal distribution, and
are added together in the process of computing the mean:
5 

x ~ N    10,  

5

7/17/2015
IENG 486 Statistical Quality & Process Control
17
Ex. Sampling Distribution
of x (cont'd)
 What is the probability the sample average is greater
than 15?
x   0   0 15  10
5
z
0

n
5
5

2.36
 2.24
 ( z )   (2.24)  ?
 Would you conclude the process is operating properly?
7/17/2015
IENG 486 Statistical Quality & Process Control
18
7/17/2015
IENG 486 Statistical Quality & Process Control
19
Ex. Sampling Distribution
of x (cont'd)
 What is the probability the sample average is greater
than 15?
x 
15  10
5
z
0
0
n
0

5
5

2.36
 2.24
 ( z )   (2.24)  0.98745
1  0.98745 0.01255  or  1.3%
 Would you conclude the process is operating properly?
7/17/2015
IENG 486 Statistical Quality & Process Control
20