Sunteți pe pagina 1din 11

1

Process capability analysis (cont.)

INSE 6220 -- Week 5

Advanced Statistical Approaches to Quality

6. Compute capability indices:


Process capability potential
Cp = (USL LSL) / 6x

S Chart
0.35

Upper capability index


CpU = (USL X ) / 3x

0.3

Standard Deviation

Process capability
More on Hypothesis Testing
More on Statistical Inference
More on Control Charts:

UCL

X-bar, R, and S control charts

0.25
0.2

Lower capability index


CpL = ( X LSL) / 3x

0.15
CL
0.1
0.05
0

10

15
20
25
Sample Number

Dr. A. Ben Hamza

30

35

Process capability index


Cpk = min (CpU, CpL)

LCL
40

Concordia University
2

Process capability analysis


1. Compute the mean of sample means ( X ).

Control Charts
Suppose we have a general statistic W
We plot W over time
We specify control limits of the form

2. Compute the mean of sample ranges ( R ).


3. Estimate the population standard deviation (x):
x = R / d2
4. Estimate the natural tolerance of the process:
Natural tolerance = 6x
5. Determine the specification limits:
USL = Upper specification limit
LSL = Lower specification limit

U C L

C L

L C L

Mean of W
Std. Dev. of W

A control chart based on a number of standard deviations of the statistic


from the mean of the statistic is called a Shewart Control Chart
Some commonly used Ws
X bar: Average
R: Range
s: Standard deviation

We can also specify control charts using probability limits

X-bar and R Charts

x Chart :

R Chart :

UCL x A2 R

UCL D4 R
Central line R

Central line x

LCL D3 R

LCL x A2 R

R xmax x min

x1 x2 ... xm
m
m 20 ~ 25
x

R1 R2 ... Rm
m
m 20 ~ 25
R

n4~6

Estimates process
mean,

A2, D3, D4=?


To find the control limits, need to estimate
the variance, or standard deviation

Control Charts for X-bar and s

UCL s 3 s
CL s
LCL s 3 s

If X 1 , X 2 ,..., X n

is a random sample from a N ( , 2 ) population, then

E (s 2 ) 2

but

E (s)

Example

11

10

12

13

Summary of Control Charts

Hypothesis Testing

15

pronounced
H nought

Alternative
Hypothesis

Null
Hypothesis

H 0 : 1.10
H1 : 1.10

X bar & R chart

X
R

d2

LCL x A 2 R

LCL D 3 R

CL x

CL R

ULC x A 2 R

ULC D 4 R

LCL x A 3 S

LCL B 3 S

CL x

CL S

ULC x A 3 S

ULC B 4 S

X bar & S chart


S
;
c4

A hypothesis test is a procedure for determining if an assertion about a characteristic of a


population is reasonable.

Example1: The mean monthly cell phone bill in this city is = $42
Example2: The proportion of adults in this city with cell phones is p = 0.68
Example3: suppose that someone says that the average price of a liter of regular unleaded
gas in Montreal is $1.10. How would you decide whether this statement is true? You could try
to find out what every gas station in the city was charging and how many liters they were
selling at that price. That approach might be definitive, but it could end up costing more than
the information is worth. A simpler approach is to find out the price of gas at a small number of
randomly chosen stations around the city and compare the average price to $1.10.
Of course, the average price you get will probably not be exactly $1.10 due to variability in
price from one station to the next. Suppose your average price was $1.18. Is this three cent
difference a result of chance variability, or is the original assertion incorrect? A hypothesis test
can provide an answer.
14

Example: S charts with MATLAB


This example plots an S chart of
measurements on newly machined parts,
taken at one hour intervals for 36 hours.
Each row of the runout matrix contains
the measurements for 4 parts chosen at
random. The values indicate, in
thousandths of an inch, the amount the
part radius differs from the target radius.
>> load parts
>> controlchart(runout,'chart','xbar','sigma',std');
>> controlchart(runout,'chart','s', 'sigma','std');

16

Hypothesis Test Terminology: review

The significance level is related to the degree of certainty you require in order to reject the
null hypothesis in favor of the alternative. By taking a small sample you cannot be certain
about your conclusion. So you decide in advance to reject the null hypothesis if the
probability of observing your sampled result is less than the significance level. For a
typical significance level of 5%, the notation is = 0.05. For this significance level, the
probability of incorrectly rejecting the null hypothesis when it is actually true is 5%. If you
need more protection from this error, then choose a lower value of .

The p-value is the probability of observing the given sample result under the assumption
that the null hypothesis is true. If the p-value is less than , then you reject the null
hypothesis. For example, if = 0.05 and the p-value is 0.03, then you reject the null
hypothesis. The converse is not true. If the p-value is greater than , you have insufficient
evidence to reject the null hypothesis.

The outputs for many hypothesis test functions also include confidence intervals. Loosely
speaking, a confidence interval is a range of values that have a chosen probability of
containing the true hypothesized quantity. Suppose, in the example, 1.15 is inside a 95%
confidence interval for the mean, . That is equivalent to being unable to reject the null
hypothesis at a significance level of 0.05. Conversely if the 100(1- ) confidence interval
does not contain 1.15, then you reject the null hypothesis at the level of significance.

17

Inference on the mean of a population, variance known


H 0 : 0
H 1 : 0

19

Using the p value

(3-22)

Z0

X 0

/ n

(3-23)

H1 in equation (3-22) is a two-sided alternative hypothesis


The procedure for testing this hypothesis is to:
take a random sample of n observations on the random variable x,
compute the test statistic, and
reject H0 if |Z 0| > Z/2, where Z/2 is the upper /2 percentage of the
standard normal distribution.

The p-value is the probability of obtaining a sample result


that is at least as unlikely as what is observed.
The p-value can be used to make the decision in a hypothesis
test by noting that:
if the p-value is less than the level of significance , the
value of the test statistic is in the rejection region.
if the p-value is greater than or equal to , the value of the
test statistic is not in the rejection region.
Reject H0 if the p-value < .

Steps of Hypothesis Testing

In some situations we may wish to reject H0 only if the true mean is larger

Using the p value


4. Collect the sample data and compute the value of the test statistic.
5. Use the value of the test statistic to compute the p value.

than 0
Thus, the one-sided alternative hypothesis is H1 : >0 , and we would reject
H0 : =0 only if Z0>Z

If rejection is desired only when <0

6. Reject H0 if p-value < .

Then the alternative hypothesis is H1: <0, and we reject H0 only if Z 0<Z
18

Confidence interval on the mean, variance known

20

Using the p-value


Given the observed result for Z0 or t0, and knowing the distribution of Z0 and t0
assuming the null hypothesis is true, it is possible to compute the probability (pvalue) of observing this result. A very small p-value casts doubt on the truth of the
null hypothesis. For example, suppose that the p-value was 0.001, meaning that
the probability of observing the given Z0 or t0 was one in a thousand. That should
make you skeptical enough about the null hypothesis that you reject it rather than
believe that your result was just a lucky 999 to 1 shot.

Furthermore, a 100(1 )% upper confidence bound on is

whereas a 100(1 )% lower confidence bound on is

21

Example: Glow Toothpaste


Two-Tailed Tests about a Population Mean:

Example: Glow Toothpaste

Large n

The production line for Glow toothpaste is designed to fill tubes of toothpaste with
a mean weight of 6 ounces. Periodically, a sample of 30 tubes will be selected in
order to check the filling process. Quality assurance procedures call for the
continuation of the filling process if the sample results are consistent with the
assumption that the mean filling weight for the population of toothpaste tubes is 6
ounces; otherwise the filling process will be stopped and adjusted.

23

1 (2.74) 1 0.996928 0.0031

Two-Tailed Tests about a Population Mean: Large n


A hypothesis test about the population mean can be used to help determine when the
filling process should continue operating and when it should be stopped and corrected.

Considering the same probability of a larger difference in the lower tail of


the distribution, we have
p-value = 2(0.0031) = 0.0062
The p-value .0062 is less than = 0.05, so H0 is rejected.

Hypotheses
H0:
H 1:

Using the p-Value for a Two-Tailed Hypothesis Test


Suppose we define the p-value for a two-tailed test as double the
area found in the tail of the distribution.
With Z0 = 2.74, the standard normal probability table shows:

Rejection Rule
ssuming a .05 level of significance,
Reject H0 if Z0 < -1.96 or if Z0 > 1.96

Example: Glow Toothpaste

Two-Tailed Test about a Population Mean: Large n


Assume that a sample of 30 toothpaste tubes
provides a sample mean of 6.1 ounces and standard
deviation of 0.2 ounces.
Let n = 30, x = 6.1 ounces, = 0.2 ounces

Z0

x 0

6.1 6
2.74
/ n 0.2/ 30

Since 2.74 > 1.96, we reject H0.

Two-Tailed Test about a Population Mean: Large n


Conclusion: We are 95% confident that the mean
filling weight of the toothpaste tubes is not 6
ounces. The filling process should be stopped
and the filling mechanism adjusted.

22

Confidence Interval Approach to a


Two-Tailed Test about a Population Mean
Select a simple random sample from the population and use the value of the

sample mean x to develop the confidence interval for the population mean .
If the confidence interval contains the hypothesized value 0, do not reject H0.
Otherwise, reject H0.

Confidence Interval Approach to a Two-Tailed Hypothesis Test


The 95% confidence interval for is
x z / 2

6.1 1. 96(. 2
n

30 ) 6.1 . 0716

or 6.0284 to 6.1716
Since the hypothesized value for the population mean, 0 = 6, is not
in this interval, the hypothesis-testing conclusion is that the null
hypothesis, H0: = 6, can be rejected.

24

Inference on the mean of a normal distribution with variance


unknown

25

27

26

28

For the two-sided alternative hypothesis, reject H0 if |t0 | > t/2,n-1, where
t/2,n-1, is the upper /2 percentage of the t distribution with n 1 degrees of
freedom
For the one-sided alternative hypotheses,
If H1: 1 > 0, reject H0 if t0 > t,n 1, and
If H1: 1 < 0, reject H0 if t0 < t,n 1
One could also compute the P-value for a t-test

Confidence interval on the mean of a normal distribution with


variance unknown

p_value:

2[1- F (| t0 |)] for a two-tailed test

p value 1- F (t 0 )
for an upper-tailed test
F (t )
for a lower-tailed test
0

where F is the cdf of the t-distribution.

29

31

The probability of type II error and sample size decisions

Inference on a population proportion


Hypothesis Testing

n
n
z / 2
z / 2

Sample size calculation for two-tailed tests:

30

Inference on a population proportion


Confidence intervals on a population proportion

(Z / 2 Z )2 2

, where 0

32

Inference for a difference in means, variances known

33

35

Statistical inference for two samples

34

Hypothesis tests for a difference in means, variances known

Inference for a difference in means of two normal


Distributions: Variances unknown
Hypothesis Tests for the Difference in Means

Confidence interval on a difference in means, variances known

36

37

39

38

40

Example 3.9
The top figure shows comparative box plot for the
yield data for the two types of catalysts. These
comparative boxplots indicate that there is no
obvious difference in the median of the two
samples, although the second sample has a
slightly larger sample dispersion or variance. There
are no exact rules for comparing two samples with
boxplots; their primary value is in the visual
impression they provide as a tool for explaining the
results of a hypothesis test, as well as in the
verification of assumptions.

97
96
95
94
Yield

93
92
91
90
89
1

2
Catalyst type

Normal Probability Plot


0.9 5

The bottom figure shows the normal probability plot


of the two samples of yield data. Note that both
samples plot approximately along straight lines,
and the straight lines for each sample have similar
slopes (i.e. similar standard deviations). Hence, we
conclude that the normality and equal variances
assumptions are reasonable.

0.9 0
catalyst 1
0.7 5
Probability

0.5 0
catalyst 2
0.2 5

0.1 0
0.0 5
89

90

91

92

93
Data

94

95

96

97

41

Pooled-Variance t-Test Example


You are a financial analyst for a brokerage firm. Is there a
difference in dividend yield between stocks listed on the NYSE
& NASDAQ? You collect the following data:
NYSE NASDAQ
Number
21
25
Sample mean
3.27
2.53
Sample std dev 1.30
1.16

H0: 1 - 2 = 0 i.e. (1 = 2)
H1: 1 - 2 0 i.e. (1 2)
= 0.05
df = 21 + 25 - 2 = 44

Reject H0

Reject H0

.025

-2.0154

.025

0 2.0154

Critical Values: t = 2.0154

2.040
Test Statistic:

Assuming both populations are


approximately normal with
equal variances, is
there a difference in mean
yield ( = 0.05)?

3.27 2.53

t0

Pooled-Variance t Test Example: Calculating the


Test Statistic

43

Pooled-Variance t Test Example: Hypothesis Test


Solution

42

1
1
1.5021

21 25

Decision:
2.040 Reject H0 at = 0.05
Conclusion:
There is evidence of a
difference in means.

Pooled-Variance t Test Example: Confidence


Interval for 1 - 2

(continued)

Since we rejected H0 can we be 95% confident that NYSE > NASDAQ?

H0: 1 - 2 = 0 i.e. (1 = 2)
H1: 1 - 2 0 i.e. (1 2)

95% Confidence Interval for NYSE - NASDAQ


The test statistic is:

t0

X1 X 2 1 2
1
1
S
n1 n 2
2
p

2
p

3.27 2.53 0
1
1
1.5021
21 25

2
2

21 11.30 2 25 11.16 2
n1 1S1 n2 1S 2

(n1 1) (n2 1)

2.040

(21 - 1) (25 1)

1.5021

X 2 t /2, n1 n2 2

1
1
Sp2 0.74 2.0154 0.3628 (0.09, 1.471)
n1 n 2

Since 0 is less than the entire interval, we can be 95% confident that
NYSE > NASDAQ

44

S-ar putea să vă placă și