1

INSE 6220 -- Week 5
Advanced Statistical Approaches to Quality
S Chart
0.35

0.3
UCL
• Process capability 0.25

Standard Deviation
• More on Hypothesis Testing 0.2

• More on Statistical Inference 0.15
CL
• More on Control Charts: 0.1

X-bar, R, and S control charts 0.05

0 LCL
0 5 10 15 20 25 30 35 40
Sample Number

Dr. A. Ben Hamza Concordia University

2

Process capability analysis

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

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 = 6σx

5. Determine the specification limits:
USL = Upper specification limit
LSL = Lower specification limit

3

Process capability analysis (cont.)
6. Compute capability indices:
Process capability potential
Cp = (USL – LSL) / 6σx

Upper capability index
CpU = (USL – X ) / 3σx

Lower capability index
CpL = ( X – LSL) / 3σx

Process capability index
Cpk = min (CpU, CpL)

4

Control Charts
• Suppose we have a general statistic W
• We plot W over time
• We specify control limits of the form
U C L    3
W W Mean of W
C L   W

L C L   W  3 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 W’s
 X bar: Average
 R: Range
 s: Standard deviation
• We can also specify control charts using probability limits

need to estimate the variance.  xm x 1 2 R1  R2  . or standard deviation . D4=? mean... µ To find the control limits.. 5 X-bar and R Charts x  Chart : R  Chart : UCL  x  A2 R UCL  D4 R Central line  x Central line  R LCL  D3 R LCL  x  A2 R R  xmax  xmin x  x  .. D3.  Rm m R m  20 ~ 25 m m  20 ~ 25 n4~6 Estimates process A2.

X 2 .. 6 Control Charts for X-bar and s UCL   s  3 s CL   s LCL   s  3 s If X 1 .. X n is a random sample from a N (  .. then E (s 2 )   2 but E (s)   ..  2 ) population.

7 .

8 .

Example 9 .

10 .

11 .

12 .

UCL  x  A3 S UCL  B4 S c4 . 13 Summary of Control Charts ˆ  X LCL  x  A2 R LCL  D3 R X bar & R chart R CL  x CL  R ˆ  d2 UCL  x  A2 R UCL  D4 R ˆ  X LCL  x  A3S LCL  B3S X bar & S chart CL  x CL  S S ˆ  .

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

Suppose your average price was $1. That approach might be definitive.18.10 due to variability in price from one station to the next. 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. or is the original assertion incorrect? A hypothesis test can provide an answer.10.10.10 A hypothesis test is a procedure for determining if an assertion about a characteristic of a population is reasonable. but it could end up costing more than the information is worth. . 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. the average price you get will probably not be exactly $1.68 Example3: suppose that someone says that the average price of a liter of regular unleaded gas in Montreal is $1.Hypothesis Testing 15 pronounced Null H “nought” Alternative Hypothesis Hypothesis H 0 :   1. Is this three cent difference a result of chance variability. Of course.10 H1 :   1. 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.

Suppose. • The outputs for many hypothesis test functions also include confidence intervals. in the example. then you reject the null hypothesis.) confidence interval does not contain 1. a confidence interval is a range of values that have a chosen probability of containing the true hypothesized quantity. If the p-value is greater than . If you need more protection from this error. Loosely speaking. If the p-value is less than . For a typical significance level of 5%. • The p-value is the probability of observing the given sample result under the assumption that the null hypothesis is true. By taking a small sample you cannot be certain about your conclusion.05 and the p-value is 0. That is equivalent to being unable to reject the null hypothesis at a significance level of 0.05.15. the probability of incorrectly rejecting the null hypothesis when it is actually true is 5%. the notation is  = 0. then you reject the null hypothesis. then you reject the null hypothesis at the  level of significance. 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. then choose a lower value of  . 1. . µ. For example.03. Conversely if the 100(1.15 is inside a 95% confidence interval for the mean. 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 this significance level. if  = 0.05. you have insufficient evidence to reject the null hypothesis. The converse is not true.

and we reject H0 only if Z0<−Zα . and  reject H0 if |Z0| > Z/2. where Z/2 is the upper /2 percentage of the standard normal distribution. the one-sided alternative hypothesis is H1: µ>µ0. • In some situations we may wish to reject H0 only if the true mean is larger than µ0  Thus. 17 Inference on the mean of a population. variance known H 0 :   0 H1 :    0 (3-22) X  0 Z0  (3-23) / n •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. and we would reject H0: µ=µ0 only if Z0>Zα • If rejection is desired only when µ<µ0  Then the alternative hypothesis is H1: µ<µ0.  compute the test statistic.

variance known Furthermore. a 100(1 − α)% upper confidence bound on µ is whereas a 100(1 − α)% lower confidence bound on µ is . 18 Confidence interval on the mean.

• 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 < . Use the value of the test statistic to compute the p value. 19 Using the p value  The p-value is the probability of obtaining a sample result that is at least as unlikely as what is observed. 6. 5. the value of the test statistic is in the rejection region. Reject H0 if p-value < . Collect the sample data and compute the value of the test statistic. . Steps of Hypothesis Testing Using the p value 4.  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 .

it is possible to compute the probability (p- value) of observing this result. meaning that the probability of observing the given Z0 or t0 was one in a thousand. For example. 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. suppose that the p-value was 0. 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.001. . A very small p-value casts doubt on the truth of the null hypothesis.

 Hypotheses H0:    H1:   Rejection Rule ssuming a . otherwise the filling process will be stopped and adjusted.96 or if Z0 > 1.96 . Reject H0 if Z0 < -1. • 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. 21 Example: Glow Toothpaste • Two-Tailed Tests about a Population Mean: Large n The production line for Glow toothpaste is designed to fill tubes of toothpaste with a mean weight of 6 ounces. a sample of 30 tubes will be selected in order to check the filling process. Periodically. 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.05 level of significance.

74  / n 0. .1 ounces.74 > 1.1  6 Z0    2.  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. 22 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. Let n = 30.  = 0.1 ounces and standard deviation of 0.96.2 ounces x  06. x = 6.2 / 30 Since 2. The filling process should be stopped and the filling mechanism adjusted.2 ounces. we reject H0.

the standard normal probability table shows: 1   (2.74.0031 Considering the same probability of a larger difference in the lower tail of the distribution.74)  1  0.0031) = 0. so H0 is rejected. we have p-value = 2(0. 23 Example: Glow Toothpaste • 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.0062 is less than  = 0.996928  0. With Z0 = 2.0062 The p-value .05. .

the hypothesis-testing conclusion is that the null hypothesis. 96(.Confidence Interval Approach to a 24 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 . . can be rejected. do not reject H0. 0716 n or 6. • If the confidence interval contains the hypothesized value 0. 0 = 6. Otherwise. H0:  = 6.1  1. • Confidence Interval Approach to a Two-Tailed Hypothesis Test The 95% confidence interval for  is  x  z / 2  6.1716 Since the hypothesized value for the population mean. reject H0.1 . 2 30 )  6. is not in this interval.0284 to 6.

• If H1: µ1 > µ0. 25 Inference on the mean of a normal distribution with variance unknown • For the two-sided alternative hypothesis. where t/2.n-1. and • If H1: µ1 < µ0.n − 1 • One could also compute the P-value for a t-test . is the upper /2 percentage of the t distribution with n  1 degrees of freedom • For the one-sided alternative hypotheses. reject H0 if t0 < −tα.n − 1. reject H0 if |t0| > t/2.n-1. reject H0 if t0 > tα.

. 26 Confidence interval on the mean of a normal distribution with variance unknown p_value: 2[1.F (t0 ) for an upper-tailed test  F (t ) for a lower-tailed test  0 where F is the cdf of the t-distribution.F (| t0 |)] for a two-tailed test  p value  1.

27 .

28 .

29 Inference on a population proportion Hypothesis Testing .

30 Inference on a population proportion Confidence intervals on a population proportion .

31 The probability of type II error and sample size decisions   n   n     z / 2       z / 2         Sample size calculation for two-tailed tests: ( Z / 2  Z  ) 2  2 n . where     0  2 .

32 .

variances known Statistical inference for two samples . 33 Inference for a difference in means.

variances known Confidence interval on a difference in means. 34 Hypothesis tests for a difference in means. variances known .

35 .

36 Inference for a difference in means of two normal Distributions: Variances unknown Hypothesis Tests for the Difference in Means .

37 .

38 .

39 .

their primary value is in the visual 90 impression they provide as a tool for explaining the 89 1 2 results of a hypothesis test.25 conclude that the normality and equal variances 0.05 89 90 91 92 93 94 95 96 97 Data .e. 0. Note that both 0. similar standard deviations). we 0. Hence. although the second sample has a Yield 93 slightly larger sample dispersion or variance.95 • The bottom figure shows the normal probability plot 0. There 92 are no exact rules for comparing two samples with 91 boxplots.9 • The top figure shows comparative box plot for the 97 yield data for the two types of catalysts.50 and the straight lines for each sample have similar catalyst 2 slopes (i.75 samples plot approximately along straight lines. Normal Probability Plot 0. Probability 0. These 96 comparative boxplots indicate that there is no 95 obvious difference in the median of the two 94 samples. 40 Example 3.90 catalyst 1 of the two samples of yield data.10 assumptions are reasonable. as well as in the Catalyst type verification of assumptions.

53 Sample std dev 1.05)? . 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.30 1.16 Assuming both populations are approximately normal with equal variances. 41 Pooled-Variance t-Test Example You are a financial analyst for a brokerage firm. is there a difference in mean yield ( = 0.27 2.

040 1 1   1 1  S    2 p 1.2 ≠ 0 i.27  2.5021    n1 n 2   21 25  n S  1 2  1S1 2  n 2  1S 2 2  21  11. (1 = 2) H1: 1 .e.16 2  1.1)  ( 25  1) p .53  0  2. (1 ≠ 2) The test statistic is: t0   X  X       1 2 1  2  3.e.30 2  25  11.2 = 0 i.Pooled-Variance t Test Example: Calculating the 42 Test Statistic (continued) H0: 1 .5021 (n1  1)  (n2  1) (21 .

e.0154 t Critical Values: t = ± 2.040 Reject H0 at  = 0.Pooled-Variance t Test Example: Hypothesis Test 43 Solution Reject H0 Reject H0 H0: 1 .e. (1 ≠ 2)  = 0.025 df = 21 + 25 .53 t0   2. (1 = 2) H1: 1 .05 .5021    Conclusion:  21 25  There is evidence of a difference in means.27  2.2 = 0 i.2 ≠ 0 i.05  1 1  1.2 = 44 -2.0154 0 2.0154 2. .040 Test Statistic: Decision: 3.025 .

µNASDAQ 1 1   X X   t 1 2  /2.74  2.Pooled-Variance t Test Example: Confidence 44 Interval for µ1 . we can be 95% confident that µNYSE > µNASDAQ .µ2 Since we rejected H0 can we be 95% confident that µNYSE > µNASDAQ? 95% Confidence Interval for µNYSE .3628  (0.n1  n2  2 S     0.471) 2 p  n1 n 2  Since 0 is less than the entire interval.0154  0. 1.09.