Sei sulla pagina 1di 10

NATIONAL HO CHI MINH CITY UNIVERSITY

HO CHI MINH UNIVERSITY OF TECHNOLOGY

REPORT
Application of Probabilities and Statistics

Lecturer
Nguyễn Tiến Dũng
HYPOTHESIS TYPE 1 & 2

An automotive engineer is curious about controlling the diameter of a shaft.


Beneath the ordinary (in control) manufacturing process, the diameter is regularly
distributed with mean of 10mm and standard deviation of 1mm. They records the
distinction between the measured value and the nominal value for each shaft. On the off
chance that the absolute value of the distinction, D = M - 10 (M is the measurement), is
beyond a basic value, they will check to see in case the manufacturing process is out of
control.
What is the probability that they will check the machine but the manufacturing process is,
in fact, in control? Or, in other words, what is the probability that they will check the
machine even though the process is in the normal state and the check is actually
unnecessary?
Assume that there is no measurement error. Under normal manufacturing conditions, D is
normally distributed with mean of 0 and standard deviation of 1. If the critical value is
1.649, the probability that the difference is beyond this value (that she will check the
machine), given that the process is in control, is:

So, the probability that she is going to check the machine but find the process is, in fact, in
control is 0.1. This probability is the Type I error, which may also be called false alarm
rate, α error, producer’s risk, etc.
The engineer realizes that the probability of 10% is too high because checking the
manufacturing process is not an easy task and is costly. She wants to reduce this number
to 1% by adjusting the critical value. The new critical value is calculated as:

Using the inverse normal distribution, the new critical value is 2.576. From the above
equation, it can be seen that the larger the critical value, the smaller the Type I error.
By adjusting the critical line to a higher value, the Type I error is reduced. However, the
engineer is now facing a new issue after the adjustment. Some customers complain that the
diameters of their shafts are too big. Instead of having a mean value of 10, they have a
mean value of 12, which means that the engineer didn’t detect the mean shift and she needs
to adjust the manufacturing process to its normal state.

1
What is the probability of failing to detect the mean shift under the current critical value,
given that the process is indeed out of control? In this case, the mean of the diameter has
shifted. The answer for this question is found by examining the Type II error.
The engineer asks a statistician for help. The statistician uses the following equation to
calculate the Type II error:

Here, is the mean of the difference between the measured and nominal shaft diameters
and is the standard deviation. The mean value of the diameter shifting to 12 is the same
as the mean of the difference changing to 2. From the above equation, we can see that the
larger the critical value, the larger the Type II error.
The result tells us that there is a 71.76% probability that the engineer cannot detect the shift
if the mean of the diameter has shifted to 12. This is the reason why oversized shafts have
been sent to the customers, causing them to complain.
It seems that the engineer must find a balance point to reduce both Type I and Type II
errors. If she increases the critical value to reduce the Type I error, the Type II error will
increase. If she reduces the critical value to reduce the Type II error, the Type I error will
increase. The engineer asks the statistician for additional help.
The statistician notices that the engineer makes her decision on whether the process needs
to be checked after each measurement. This means the sample size for decision making is
1. The statistician suggests grouping a certain number of measurements together and
making the decision based on the mean value of each group. By increasing the sample size
of each group, both Type I and Type II errors will be reduced. However, a large sample
size will delay the detection of a mean shift. The smallest sample size that can meet both
Type I and Type II error requirements should be determined. The engineer provides her
requirements to the statistician.
The engineer wants:
1. The Type I error to be 0.01.
2. The Type II error to be less than 0.1 if the mean value of the diameter shifts from 10
to 12 (i.e., if the difference shifts from 0 to 2).
Tables and curves for determining sample size are given in many books. These curves are
called Operating Characteristic (OC) Curves. From the OC curves of Appendix A in
reference [1], the statistician finds that the smallest sample size that meets the engineer’s
requirement is 4.

2
This sample size also can be calculated numerically by hand. Assume the sample size
is n in each group. The mean value and the standard deviation of the mean value of the
deviation (difference between measurement and nominal value) of each group is 0
and under the normal manufacturing process. Based on the Type I error
requirement, the critical value for the group mean can be calculated by the following
equation:

Under the abnormal manufacturing condition (assume the mean of the deviation shifts to 2
and the standard deviation is unchanged), the Type II error is:

The smallest integer that satisfies the above two equations is the value of n.
Let’s set n = 3 first. The critical value is 1.4872 when the sample size is 3. Using this
critical value, we get the Type II error of 0.1872, which is greater than the required 0.1. So
we increase the sample size to 4. The critical value becomes 1.2879. The corresponding
Type II error is 0.0772, which is less than the required 0.1. Therefore, the final sample size
is 4.
By using the mean value of every 4 measurements, the engineer can control the Type II
error at 0.0772 and keep the Type I error at 0.01.
Sometimes, engineers are interested only in one-sided changes of their products or
processes. For example, consider the case where the engineer in the previous example cares
only whether the diameter is becoming larger. The hypothesis test becomes:

Assume the sample size is 1 and the Type I error is set to 0.05. The critical value will be
1.649. For detecting a shift of , the corresponding Type II error is .
Readers can calculate these values in Excel or in Weibull++. The relation between the Type
I and Type II errors is illustrated in Figure 1:

3
Figure 1: Illustration of Type I and Type II Errors

2.
We then compute a REJECTION REGION so that there is a small predefined probability
that the test statistic could by chance lie in this region. If the test statistic lies in this region
we then decide to reject the Null Hypothesis as the probability it lies there is below the
threshold we initially set

HOW THIS WORKS - An Example When we have a large sample the Central Limit
Theorem tells us that x has approximately a NORMAL distribution. The Mean of x is μ (
the value in the Null Hypothesis) The Standard Deviation of x is σ n So we choose z x n =
− μ σ to be our TEST STATISTIC as it is Standard Normal. Looking at the Standard
Normal distribution we know that the 95th percentile is 1.645 ie: Prob(Z > 1.645) = .05

SO WHAT?
This tells us that if we
1. Choose a random sample from the Population of interest which has hypothesized mean

2. Calculate the Mean x for this Sample and use this to calculate the Test Statistic z x n =
−μσ
3. The 95th Percentile of the Standard Normal Distribution is 1.645 (ie: there is only a 5%
chance that the computed Z could be this large). So if we find that Z > 1.645 we conclude
that since there is only a 5% chance that x could be that much bigger than μ it is probable
that the real population mean is actually bigger than the hypothesized value μ. Errors
Revisited In the example above we rejected the null hypothesis because there was only a
5% chance that the Sample could have come from the Hypothesized Population. But 5% is

4
not 0% so there was in fact a 5% chance that in rejecting H0 we made a mistake - a Type I
error.

Before we embark on a Hypothesis Test we must decide what probability of a Type I error
we can live with. We cannot completely eliminate these Type I errors, one reason being
that by choosing a rejection region to lower the chance of a Type I error we actually
increase the chance of a Type II error. Definitions
• The probability of a Type I error is called the Level Of Significance of the Hypothesis
Test and is denoted by α - alpha.
• The probability of a Type II error is denoted by β. We choose α to be small ( .01, .05 or
.1) but we cannot completely eliminate the probability of a Type I error, as we mentioned
already α and β are related The only way to reduce β without increasing α is to increase the
sample size. Type I errors are generally considered the more serious so in our testing
procedure we control the probability of these errors ( α ) and usually are unaware of the
probability of Type II errors ( β ).

Example:
A car manufacturer offers a 60,000 mile warranty on its new cars. You plan on buying one
of these cars and must decide whether to purchase an extended warranty. When the car first
needs a major repair you will repair the car and then replace it, believing that it will
probably need frequent repairs afterwards. A motoring magazine has reported the number
of miles at which 30 of this manufacturer’s cars first needed repair. You will conduct a
Hypothesis test to aid your decision. What hypotheses would you test in each of the cases
below:
1. The extended warranty is very expensive
2. The extended warranty is not very expensive

Explain.
1. H0 : μ = 60,000 vs HA : μ > 60,000 As the extended warranty is very expensive you will
not purchase it unless there is substantial evidence that the first time a major repair is
needed is after the original warranty has lapsed.
2. H0 : μ = 60,000 vs HA : μ < 60,000 As the extended warranty does not cost that much
you might be inclined to buy it unless it can be shown that the first major repair tends to
occur while the original warranty is in place.

5
Confidence interval

We would expect (p1-p2) to provide a reasonable estimate of (p1-p2). Since (p2-p1) is a


linear function of binominal random variables Y1 and Y2, where E(yi) = ni*pi and V(yi)
= ni*pi*ni, we have

So, (p2-p1) is an unbiased estimate of (p2-p1) and in addition, it has minimum variance.
The central limit theorem also guarantees that, for sufficiently large sample sizes n1 and
n2, the sampling distribution of (p1-p2) will be approximately normal. It follows that a
large sample confidence interval for (p2-p1) may be obtained.
Note that we must substitute the values of p1 and p2 for p1 and p2, respectively, to obtain
an estimate of means of (p1-p2). As in the one-sample case, this approximation is
reasonable accurate when both n1 and n2 are sufficiently large, i.e if the intervals

Do not contain 0 or the sample size (n1 or n2). This will be true if n1p1, n2p2, n1q1 and
n2q2 are all greater than or equal to 4.
Large-sample (1-apla)*100% confidence interval for (p1-p2)

where p1 and p2 are the sample proportion of observation with the characteristic of interest.

6
Example for application of automotive engirnering
A traffic engineer conducted a study of vehicular speeds on a segment of street that had the
posted speed limit changed several times. When the posted speed limit on the street was 30
miles per hour, the engineer monitored the speeds of 100 randomly selected vehicles
traversing the street and observed 49 violations of the speed limit. After the speed limit
was raised to 35 miles per hour, the inviolation of the speed limit. Find a 99% confidence
interval for (p1-p2), where p1 is the true proportion of vehicles that (under similar driving
conditions) exceed the lower speed limit (30 miles per hour) and p2 is the true proportion
of vehicles that( under similar driving conditions) exceed the higher speed limit (35 miles
per hour). Interpret the interval.

All exceed 4. Thus, we can apply the approximation for a large sample confidence interval
for (p1-p2).
For a confidence interval of (1-a)=.99, wa have a=0.1 and Za/2 = Z.005 = 2.58 Substitution
into the confidence interval formula yields

7
Our interpretation is that the true difference, (p1-p2), falls with 99% confidence. Since the
lower bound on our estimate is positive, we are fairly confident that the proportion of all
vehicles in violation o fthe lower speed limit (30 miles per hour) exceeds the corresponding
proportion in violation of the higher speed limit (35 miles per hour) by at least.

8
Works Cited
(n.d.). Retrieved from http://www.ucd.ie/statdept/classpages/stat10050_part9.pdf
(2019). Retrieved from weibull: https://www.weibull.com/hotwire/issue88/relbasics88.htm

D. C. Montgomery and G.C. Runger, Applied Statistics and Probability for Engineers. 2nd Edition, John Wiley &
Sons, New York, 1999.

D. Kececioglu, Reliability & Life Testing Handbook, Volume 2. Prentice-Hall, New Jersey, 1994.

Potrebbero piacerti anche