You are on page 1of 166

Hypothesis Testing

Part 1
Hypotheses

are two competing claim or


statements about some
parameter that need to be
decided which claim or
statement is true, and the
decision making procedure is
called Hypothesis Testing
Hypotheses

H y p o t h e s i s Te s t i n g a n d
Confidence Intervals are very
close connected because they
are the fundamental methods
used at the data analysis stage
of a comparative experiment, in
which the engineer is interested
Definiton
Statistical Hypothesis -
is a statement about
parameters of one or
more population.
Structure of
Hypothesis Testing

H0 ⇒ Null Hypothesis
H1 ⇒ Alternative Hypothesis
H0 ⇒ Null Hypothesis

The null hypothesis, which


refers to any hypothesis we
wish to test
Null Hypothesis
• This is a working hypothesis
about the population parameter
in question.
• The value specified is often a
historical value, a claim, or a
production specification.
H1 ⇒ Alternative Hypothesis

The alternative hypothesis


usually represents the
question to be answered or
the theory to be tested.
Alternative Hypothesis
• This hypothesis differs from
the null hypothesis; it Is the
one to be accepted when the
null hypothesis must be
rejected
Hypotheses testing leads you
to the one of the two
following conclusions:
(1)

reject H0
in favor of H1
…because sufficient evidence
in the data has shown that…
(or sufficient evidence support
the claim that…)
(2)

fail to reject H0
in favor of H1
…because insufficient
evidence in the data did not
support the claim that…
Types of Errors
The decision procedure can
lead to either of two wrong
conclusions, because our
decision is based on random
variables, probabilities can be
associated with the type I and
type II errors
If we reject the
null hypothesis
when it is, in
fact, true, we
have made an
error that is
called

Type I error
If we fail to reject
the null
hypothesis when
it is, in fact, true,
we have made
an error that is
called

Type II error
Possible Situations for Testing a Statistical
Hypothesis

H0 is True H0 is False

Do not Correct Type II Error


reject H0 Decision (𝞫-error)

Reject Type I Error Correct


H0 (𝜶-error) Decision
Probability of Error
The probability of making a
type I error is denoted by the
Greek letter ︎𝜶 (called
Significance Level).
𝜶 = P(type 1 error)
= P(reject H0 when H0 is true)
The succeeding
discussions are
concerned w/ the
ingredients of
statistical test

DON’T TAKE THEM


FOR GRANTED!
Types of Statistical Tests
A statistical test is:
a) two-tailed if H1 states that the
parameter is different from (≠)
the value claimed in H0.
Types of Statistical Tests
A two-tail test is conducted
whenever the alternative
hypothesis specifies that the
mean is not equal to the value
stated in the null hypothesis—that
is, when the hypotheses assume
the following form:
H0: μ=μ0; H1: μ≠μ0
Types of Statistical Tests
A statistical test is:
b) left-tailed if H1 states that the
parameter is less than (<) the
value claimed in H0.
Types of Statistical Tests
There are two one-tail tests. We
conduct a one-tail test that focuses on
the right tail of the sampling
distribution whenever we want to know
whether there is enough evidence to
infer that the mean is greater than the
quantity specified by the null hypoth-
esis—that is, when the hypotheses are
H0: μ=μ0; H1: μ>μ0
Types of Statistical Tests
A statistical test is:
c) right-tailed if H1 states that the
parameter is greater than (>) the
value claimed in H0.
Types of Statistical Tests
The second one-tail test involves the
left tail of the sampling distribution. It is
used when the statistics practitioner
wants to determine whether there is
enough evidence to infer that the mean
is less than the value of the mean stated
in the null hypothesis. The resulting
hypotheses appear in this form:
H0: μ=μ0; H1: μ<μ0
Basic components of
a statistical test
1. Parameter of Interest - from the
problem context, identify the
parameter of interest

2. H 0 and H 1 - state the null


hypothesis, and specify the
appropriate alternative hypothesis

3. Significance Level, 𝜶
3. Test statistic - Determine
the appropriate test
statistic (e.g., Z0)

4. P-value - necessary to
support H1
5. Reject Ho if - State the rejection
criteria fo the null hypothesis
6. Computation - Compute any
necessary sample quantities,
substitute these into the
equation for the test statistic,
and compute that value
7. Draw conclusion - Decide
whether or not H0 should
be rejected and report that
in the problem context
Hypothesis tests of 𝜇,
Given 𝒙 is Normal,
and
𝜎 is Known
Stating Hypothesis
Example
An ageing sheep dog gets
regular check-ups from the
local veterinarian. Let x be a
random variable that
represents the dog’s resting
heart rate (in beats per
minutes).
Example

From past experience, the vet


knows that x has a normal
distribution with 𝝈 = 12.
Example

The vet checked the Merck


Veterinary Manual and found
that for dogs of similar kind of
breed, 𝞵 = 115 beats per
minute.
Example
Over the past 6 weeks, the
dog’s heart rate measured
93 109 110 89 112 117
The sample mean is equal
to 105.0.
Example

The vet is concerned that the


dog’s heart rate may be
slowing. Do the data indicate
that this is the case?
The null hypothesis represents
the point of view that the dog’s
heart rate should be nearly
average

H 0 : µ = 115
H1 : µ < 115
The alternate hypothesis is the
vet’s concern about the dog’s
slowing heart rate.
H 0 : µ = 115
H1 : µ < 115
Once you have
selected H0 and H1,
how do you decide
which hypothesis
is likely to be valid?

Note: That is the concern of the


ensuing topics…
Solution:

H 0 : µ = 115 But, are the 6


observed sample
H1 : µ < 115
data (93 109 110
89 112 117 )
compatible with the
established null
hypothesis?
Solution:

Answer is…you need


to know the
probability of
obtaining a sample
mean of 105.0 or less
from a population with
true mean 𝝁=115.
Solution:

How do we compute the probability?


Solution:

Hypotheses :
State these!
H 0 : µ = 115
H1 : µ < 115

Then do this!
test statistics:
x − µ 105 − 115
z= = 4 = −2.04
σ n 12 6
Solution:
Sampling distribution for
x and corresponding z
Using the standard Distribution
normal standard table
to get
P ( x < 105.0 ) =
= P ( z < −2.04 )
= 0.0207
Table II Cumulative Standard Normal Distribution

z !0.09 !0.08 !0.07 !0.06 !0.05 !0.04 !0.03 !0.02 !0.01 !0.00
!3.9 0.000033 0.000034 0.000036 0.000037 0.000039 0.000041 0.000042 0.000044 0.000046 0.000048
!3.8 0.000050 0.000052 0.000054 0.000057 0.000059 0.000062 0.000064 0.000067 0.000069 0.000072
!3.7 0.000075 0.000078 0.000082 0.000085 0.000088 0.000092 0.000096 0.000100 0.000104 0.000108
!3.6 0.000112 0.000117 0.000121 0.000126 0.000131 0.000136 0.000142 0.000147 0.000153 0.000159
!3.5 0.000165 0.000172 0.000179 0.000185 0.000193 0.000200 0.000208 0.000216 0.000224 0.000233
!3.4 0.000242 0.000251 0.000260 0.000270 0.000280 0.000291 0.000302 0.000313 0.000325 0.000337
!3.3 0.000350 0.000362 0.000376 0.000390 0.000404 0.000419 0.000434 0.000450 0.000467 0.000483
!3.2 0.000501 0.000519 0.000538 0.000557 0.000577 0.000598 0.000619 0.000641 0.000664 0.000687
!3.1 0.000711 0.000736 0.000762 0.000789 0.000816 0.000845 0.000874 0.000904 0.000935 0.000968
!3.0 0.001001 0.001035 0.001070 0.001107 0.001144 0.001183 0.001223 0.001264 0.001306 0.001350
!2.9 0.001395 0.001441 0.001489 0.001538 0.001589 0.001641 0.001695 0.001750 0.001807 0.001866
!2.8 0.001926 0.001988 0.002052 0.002118 0.002186 0.002256 0.002327 0.002401 0.002477 0.002555
!2.7 0.002635 0.002718 0.002803 0.002890 0.002980 0.003072 0.003167 0.003264 0.003364 0.003467
!2.6 0.003573 0.003681 0.003793 0.003907 0.004025 0.004145 0.004269 0.004396 0.004527 0.004661
!2.5 0.004799 0.004940 0.005085 0.005234 0.005386 0.005543 0.005703 0.005868 0.006037 0.006210
!2.4 0.006387 0.006569 0.006756 0.006947 0.007143 0.007344 0.007549 0.007760 0.007976 0.008198
!2.3 0.008424 0.008656 0.008894 0.009137 0.009387 0.009642 0.009903 0.010170 0.010444 0.010724
!2.2 0.011011 0.011304 0.011604 0.011911 0.012224 0.012545 0.012874 0.013209 0.013553 0.013903
!2.1 0.014262 0.014629 0.015003 0.015386 0.015778 0.016177 0.016586 0.017003 0.017429 0.017864
!2.0 0.018309 0.018763 0.019226 0.019699 0.020182 0.020675 0.021178 0.021692 0.022216 0.022750
!1.9 0.023295 0.023852 0.024419 0.024998 0.025588 0.026190 0.026803 0.027429 0.028067 0.028717
!1.8 0.029379 0.030054 0.030742 0.031443 0.032157 0.032884 0.033625 0.034379 0.035148 0.035930
!1.7 0.036727 0.037538 0.038364 0.039204 0.040059 0.040929 0.041815 0.042716 0.043633 0.044565
!1.6 0.045514 0.046479 0.047460 0.048457 0.049471 0.050503 0.051551 0.052616 0.053699 0.054799
!1.5 0.055917 0.057053 0.058208 0.059380 0.060571 0.061780 0.063008 0.064256 0.065522 0.066807
!1.4 0.068112 0.069437 0.070781 0.072145 0.073529 0.074934 0.076359 0.077804 0.079270 0.080757
!1.3 0.082264 0.083793 0.085343 0.086915 0.088508 0.090123 0.091759 0.093418 0.095098 0.096801
!1.2 0.098525 0.100273 0.102042 0.103835 0.105650 0.107488 0.109349 0.111233 0.113140 0.115070
!1.1 0.117023 0.119000 0.121001 0.123024 0.125072 0.127143 0.129238 0.131357 0.133500 0.135666
!1.0 0.137857 0.140071 0.142310 0.144572 0.146859 0.149170 0.151505 0.153864 0.156248 0.158655
!0.9 0.161087 0.163543 0.166023 0.168528 0.171056 0.173609 0.176185 0.178786 0.181411 0.184060
!0.8 0.186733 0.189430 0.192150 0.194894 0.197662 0.200454 0.203269 0.206108 0.208970 0.211855
!0.7 0.214764 0.217695 0.220650 0.223627 0.226627 0.229650 0.232695 0.235762 0.238852 0.241964
!0.6 0.245097 0.248252 0.251429 0.254627 0.257846 0.261086 0.264347 0.267629 0.270931 0.274253
!0.5 0.277595 0.280957 0.284339 0.287740 0.291160 0.294599 0.298056 0.301532 0.305026 0.308538
!0.4 0.312067 0.315614 0.319178 0.322758 0.326355 0.329969 0.333598 0.337243 0.340903 0.344578
!0.3 0.348268 0.351973 0.355691 0.359424 0.363169 0.366928 0.370700 0.374484 0.378281 0.382089
!0.2 0.385908 0.389739 0.393580 0.397432 0.401294 0.405165 0.409046 0.412936 0.416834 0.420740
!0.1 0.424655 0.428576 0.432505 0.436441 0.440382 0.444330 0.448283 0.452242 0.456205 0.460172
0.0 0.464144 0.468119 0.472097 0.476078 0.480061 0.484047 0.488033 0.492022 0.496011 0.500000
Solution:

If the probability is small,


i.e., P ( z−2.04 < 0.0207 )
then, we reject H0 in
favour of H1. Meaning,
the dog’s heart beat is
slowing.
Example
In the US, the Environmental
Protection Agency has been
studying Miller Creek regarding
ammonia nitrogen
concentration. For many years,
the concentration has been 2.3
mg/l.
Example
However, new golf course and
housing developments are
raising concern that the
concentration may have
changed because of increased
use of lawn fertiliser.
Example
Any change (either an increase
or decrease) in the ammonia
nitrogen concentration can
affect plant and animal life in
and around the creek.
Example
Let x be a random variable
representing ammonia nitrogen
concentration (in mg/l). Based
on recent studies of Miller
Creek, we may assume that x
has a normal distribution with 𝝈
= 0.30.
Example
Recently, a random sample of
8 water tests from the creek
gave the following x values.
2.1 2.5 2.2 2.8 3.0 2.2
2.4 2.9
The sample mean is 2.51
Solution
Given :
µ = 2.3, x = 2.51
σ = 0.30
x has a normal distribution
Statistics :
H 0 : µ = 2.3
H1 : µ ≠ 2.3
Solution
Level of Significance:
α = 0.01
Test Statistic:
x − µ 2.51− 2.3
z= = = 1.98
σ n 0.30 8
Table II Cumulative Standard Normal Distribution (continued)

z 0.00 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09
0.0 0.500000 0.503989 0.507978 0.511967 0.515953 0.519939 0.532922 0.527903 0.531881 0.535856
0.1 0.539828 0.543795 0.547758 0.551717 0.555760 0.559618 0.563559 0.567495 0.571424 0.575345
0.2 0.579260 0.583166 0.587064 0.590954 0.594835 0.598706 0.602568 0.606420 0.610261 0.614092
0.3 0.617911 0.621719 0.625516 0.629300 0.633072 0.636831 0.640576 0.644309 0.648027 0.651732
0.4 0.655422 0.659097 0.662757 0.666402 0.670031 0.673645 0.677242 0.680822 0.684386 0.687933
0.5 0.691462 0.694974 0.698468 0.701944 0.705401 0.708840 0.712260 0.715661 0.719043 0.722405
0.6 0.725747 0.729069 0.732371 0.735653 0.738914 0.742154 0.745373 0.748571 0.751748 0.754903
0.7 0.758036 0.761148 0.764238 0.767305 0.770350 0.773373 0.776373 0.779350 0.782305 0.785236
0.8 0.788145 0.791030 0.793892 0.796731 0.799546 0.802338 0.805106 0.807850 0.810570 0.813267
0.9 0.815940 0.818589 0.821214 0.823815 0.826391 0.828944 0.831472 0.833977 0.836457 0.838913
1.0 0.841345 0.843752 0.846136 0.848495 0.850830 0.853141 0.855428 0.857690 0.859929 0.862143
1.1 0.864334 0.866500 0.868643 0.870762 0.872857 0.874928 0.876976 0.878999 0.881000 0.882977
1.2 0.884930 0.886860 0.888767 0.890651 0.892512 0.894350 0.896165 0.897958 0.899727 0.901475
1.3 0.903199 0.904902 0.906582 0.908241 0.909877 0.911492 0.913085 0.914657 0.916207 0.917736
1.4 0.919243 0.920730 0.922196 0.923641 0.925066 0.926471 0.927855 0.929219 0.930563 0.931888
1.5 0.933193 0.934478 0.935744 0.936992 0.938220 0.939429 0.940620 0.941792 0.942947 0.944083
1.6 0.945201 0.946301 0.947384 0.948449 0.949497 0.950529 0.951543 0.952540 0.953521 0.954486
1.7 0.955435 0.956367 0.957284 0.958185 0.959071 0.959941 0.960796 0.961636 0.962462 0.963273
1.8 0.964070 0.964852 0.965621 0.966375 0.967116 0.967843 0.968557 0.969258 0.969946 0.970621
1.9 0.971283 0.971933 0.972571 0.973197 0.973810 0.974412 0.975002 0.975581 0.976148 0.976705
2.0 0.977250 0.977784 0.978308 0.978822 0.979325 0.979818 0.980301 0.980774 0.981237 0.981691
2.1 0.982136 0.982571 0.982997 0.983414 0.983823 0.984222 0.984614 0.984997 0.985371 0.985738
2.2 0.986097 0.986447 0.986791 0.987126 0.987455 0.987776 0.988089 0.988396 0.988696 0.988989
2.3 0.989276 0.989556 0.989830 0.990097 0.990358 0.990613 0.990863 0.991106 0.991344 0.991576
2.4 0.991802 0.992024 0.992240 0.992451 0.992656 0.992857 0.993053 0.993244 0.993431 0.993613
2.5 0.993790 0.993963 0.994132 0.994297 0.994457 0.994614 0.994766 0.994915 0.995060 0.995201
2.6 0.995339 0.995473 0.995604 0.995731 0.995855 0.995975 0.996093 0.996207 0.996319 0.996427
2.7 0.996533 0.996636 0.996736 0.996833 0.996928 0.997020 0.997110 0.997197 0.997282 0.997365
2.8 0.997445 0.997523 0.997599 0.997673 0.997744 0.997814 0.997882 0.997948 0.998012 0.998074
2.9 0.998134 0.998193 0.998250 0.998305 0.998359 0.998411 0.998462 0.998511 0.998559 0.998605
3.0 0.998650 0.998694 0.998736 0.998777 0.998817 0.998856 0.998893 0.998930 0.998965 0.998999
3.1 0.999032 0.999065 0.999096 0.999126 0.999155 0.999184 0.999211 0.999238 0.999264 0.999289
3.2 0.999313 0.999336 0.999359 0.999381 0.999402 0.999423 0.999443 0.999462 0.999481 0.999499
3.3 0.999517 0.999533 0.999550 0.999566 0.999581 0.999596 0.999610 0.999624 0.999638 0.999650
3.4 0.999663 0.999675 0.999687 0.999698 0.999709 0.999720 0.999730 0.999740 0.999749 0.999758
3.5 0.999767 0.999776 0.999784 0.999792 0.999800 0.999807 0.999815 0.999821 0.999828 0.999835
3.6 0.999841 0.999847 0.999853 0.999858 0.999864 0.999869 0.999874 0.999879 0.999883 0.999888
3.7 0.999892 0.999896 0.999900 0.999904 0.999908 0.999912 0.999915 0.999918 0.999922 0.999925
3.8 0.999928 0.999931 0.999933 0.999936 0.999938 0.999941 0.999943 0.999946 0.999948 0.999950
3.9 0.999952 0.999954 0.999956 0.999958 0.999959 0.999961 0.999963 0.999964 0.999966 0.999967
Solution
Since, H1 : µ ≠ 2.3; a 2-tailed test
P-value = 2P ( z > 1.98) = 2 ( 0.0239 ) = 0.0478
Solution

Decision
Since α = 0.01 and P-value 0.0478
then, P-value > α , therefre,
we fail to reject H 0 .
Solution
Conclusion :
The sample data are not significan at
te α = 1% level. It means further that
there is not enough evidence to conclude
that the ammona nitrogen concentration
has changed in Miller Creek.
Computing the
Type I Error
(𝞪 - error)
Example
Suppose that an engineer is
d e s i g n i n g a n a i r c re w
escape system that consists
of an ejection seat and a
rocket motor that powers the
s e a t . T h e ro c k e t m o t o r
contains a propellant should
Example
have a mean burning rate of
50 cm/sec. If the burning
rate is too low, the ejection
seat ma not function
properly, leading to an
unsafe ejection and possible
injury of the pilot.
Example
Higher burning rates may
imply instability in the
propellant or an ejection seat
that is too powerful, again
leading to possible pilot
i n j u r y. D o e s t h e m e a n
burning rate of the propellant
Example
equal to 50 cm/sec, or is it
some other value (either
higher or lower)?
Suppose that a sample n =
10 specimens is tested; 𝛔 =
2.5 cm/sec is the standard
Example
deviation of burning rate
and that the burning rate has
a distribution for which the
conditions of central limit
t h e o re m a p p l y, s o t h e
distribution of the sample
mean is approximately
Example

normal with µ = 50 and


standard deviation of

σ x = 2.5 10 = 0.79
Example
The sample mean, x-bar,
can take on many different
values (an estimate of 𝜇), say

48.5 ≤ x ≤ 51.5
these are the critical values
Solution
Therefore,

α = P ( X < 48.5 when µ =50 )


+ P ( X > 51.5 when µ =50 )
Solution
1. Parameter of interest:
-the mean burning rate of the
sod propellant; whether or
σ x = 2.5 10 = 0.79

not the mean burning rate is


50cm/sec., then
Solution
2. The Hypotheses

H0 : µ = 50 cm/sec
H1 : µ ≠ 50 cm/sec
Solution
2. The Hypotheses-you may
wish to formulate one-sided
alternative hypothesis,

H1 : µ < 50 cm/sec
H1 : µ > 50 cm/sec
Solution
3. The probability of making
𝞪-error (or the significance
level of our test) is equal to
the sum of the areas of the
shaded part of the tails of the
normal distribution
The sample mean can take on many different values. S
will not reject the null hypothesis H0: " & 50 , and if ei
H0 : µreject
= 50 the null hypothesis in favor ofH
cm/sec µ ≠
the:alternative
1
50 hypot
cm/sec
in Fig. 9-1. The values of x that are less than 48.5 and gre
region for the test, while all values that are in the interva
which we will fail to reject the null hypothesis. By co
acceptance region. The boundaries between the critical r
α /2 = 0.0287 α /2 = 0.0287
called the critical values. In our example the critical valu
to state conclusions relative to the null hypothesis H0. Th
if the test statistic falls in the critical region, and fail to re
48.5 µ = 50 51.5 X

Figure 9-2
Reject HThe
0
critical
Fail to region
Reject H0
for H :
Reject
0 $
H 0
" 50
versus Hµ1≠:50$cm/s
) 50 andµ =n50"cm/s10. µ ≠ 50 cm/s

48.5 50 51.5 x

Figure 9-1 Decision criteria for testing H : " &


3. The z-values that
corresponds to the critical
values

48.5 − 50
z48.5 = = −1.90
0.79
51.5 − 50
z51.5 = = 1.90
0.79
Therefore,

α = P ( z < −1.90 ) + P ( z > 1.90 )


= 0.0287 + 00287
= 0.0575

𝞪 can be reduced by widening


the acceptance region
The Impact of
Sample size
on the 𝞪 - error
If n is increased, say n=16

σ x = 2.5 16 = 0.625
48.5 − 50
z48.5 = = −2.40
0.625
51.5 − 50
z51.5 = = 2.40
0.625
Therefore,

α = P( z < −2.40 ) + P( z > 2.40 )


= 0.0082 + 0.0082 = 0.0164
Hypothesis Testing
about 𝝻 of a Single
Normal Population
Tests on the MEAN of a
Normal Distribution

Variance Variance
Known Unknown
Hypothesis Tests on the
Mean

Variance 2
(σ ) Known
Hypotheses

H 0 : µ = µ0
H 1 : µ ≠ µ0
( H 1 : µ > µ0 ; H 1 : µ < µ0 )

𝝁0 is a specified constant; the


sampling distribution is normal
It is usually more convenient
to standardize the sample mean
and use a test statistic based
on the standard normal distribution
i.e.,
X − µ0
Z0 = σ n
Summary

Null hypothesis: H 0 : µ = µ0
X − µ0
Test statistic: Z0 = σ n
Summary
Rejection
H1 P-Value Criterion

z0>z𝛼/2
µ ≠ µ0 P=2[1-𝚽(|z0|)]
or z0<-z𝛼/2

µ > µ0 P=1-𝚽(z0) z0>z𝛼

µ < µ0 P=𝚽(z0) z0<-z𝛼


Hypothesis Tests on the
Mean

Variance Unknown
Hypotheses

H 0 : µ = µ0
H 1 : µ ≠ µ0
( H 1 : µ > µ0 ; H 1 : µ < µ0 )

𝝁0 is a specified constant; the


sampling distribution is normal
Summary

Null hypothesis: H 0 : µ = µ0
X − µ0
Test statistic: T0 = S n
Summary
Rejection
H1 P-Value Criterion
Probability
above |t0| & t0>t𝛼/2,n-1
µ ≠ µ0 probability or t0<-t𝛼/2,n-1
below |t0|
Probability
µ > µ0 above t0
t0>t𝛼,n-1

Probability
µ < µ0 below t0
t0<-t𝛼,n-1
Example

The increased availability of


light materials with high
strength has revolutionised
the design and manufacture
of golf clubs, particularly
drivers.
Example
Clubs with hollow heads and
very thin face can rest in
much longer tee shots,
especially for players of
modest skills.
Example
This is due
partly to the
“spring like
effect” that the
thin face
imparts to the
ball.
Example
Firing a golf ball at the head
of the club and measuring the
ratio of the outgoing velocity
of the ball to the incoming
velocity can quantify this
spring-like effect.
Example
The ratio of velocities is
c a l l e d t h e c o e f fi c i e n t o f
restitution of the club. An
experiment was performed in
which 15 drivers produced by
a particular club maker were
selected at random and their
Example
c o e f fi c i e n t o f re s t i t u t i o n
measured. In the experiment
the golf balls were fixed from
an air cannon so that the
incoming velocity and spin
rate of the ball could be
precisely controlled.
Example
It is of interest to determine if
there is evidence (with 𝛼 =
0.05) to support a claim that
t h e m e a n c o e f fi c i e n t o f
restitution exceeds 0.82. Te
observations follow:
Observations

0.8411 0.8191 0.8182 0.8125 0.8750

0.8580 0.8532 0.8483 0.8276 0.7983

0.8042 0.8730 0.8282 0.8359 0.8660


Solution
Row Total

0.8411 0.8191 0.8182 0.8125 0.8750 4.1659

0.8580 0.8532 0.8483 0.8276 0.7983 4.1854

0.8042 0.8730 0.8282 0.8359 0.8660 4.2073

Total 12.5586
Solution
12.5586
x= = 0.83724
15

∑ (x − x )
2

s= = 0.02456
n−1
Solution
1)Parameter of Interest:
- mean coefficient of
restitution
Solution
2) Hypotheses & Level of
Significance

H 0 : µ = 0.82
H 1 : µ > 0.82
α = 0.05
Solution

3) Test Statistic
x −µ
t=
s n
Solution
4) Decision Rule

Reject H 0 if the mean


coefficient of restitution
exceeds 0.82
Solution
4) Decision Rule

Similarly, if P-value <0.05,


reject H 0
Solution
5) Computation

0.83725 − 0.82
t= = 2.72
9.02456 15
Solution
6) Conclusion
Since, t0 = 2.27 > t0.05 ,14 = 1.761
reject H 0 . Ths means that the
coeffcient of restitution exceeds
0.82
Solution
6) Conclusion (P-value)

0.005 < P < 0.01


Solution
6) Conclusion (P-value)
Since, t0 = 2.27 fall between
α = 0.01 & α = 0.005, i.e.,
0.005 < P < 0.01, ∴ , P < 0.05.
Reject H 0 & conclude that
mean coefficient restitution > 0.82
Hypothesis Testing
on the Population
Variance
Hypotheses

H0 : σ = σ
2 2
0

H1 : σ ≠ σ
2 2
0

H1 : σ > σ ; H1 : σ < σ
2 2
0
2 2
0
Test Statistic

χ 2
=
( n − 1) S 2

0
σ 2
0
χ = chi − square distribution
2
0

s = sample variance
2

n = number of observations
Summary

Null hypothesis: H 0 : µ = µ0
X − µ0
Test statistic: T0 = S n
Summary
H1 Rejection Criterion

σ ≠σ
2 2
0
χ >χ
2
0
2
α 2,n−1
χ <χ
2
0
2
α 2,n−1

σ >σ
2 2
0
χ >χ 2
0
2
α ,n−1

σ <σ
2 2
0
χ < −χ
2
0
2
α ,n−1
Example
An automated filling station is
used to fill bottles with liquid
detergent. A random sample
of 20 bottles rests in a sample
2
variance of s = 0.0153 (fl
2
oz) .
Example
If the variance of fill volume
exceeds 0.01 ( fl oz) , an2

acceptable proportion of
bottles will be undefiled or
overfilled. Is there evidence
in the sample data to suggest
that the manufacturer has a
Example
problem with undefiled or
o v e r fi l l e d b o t t l e s ? U s e
𝛂=0.05, and assume that fill
volume has a normal
distribution.
Solution

1)Parameter of Interest:
- population variance 𝛔 2
Solution
2) Hypotheses & Level of
Significance
H 0 : σ = 0.01
2

H 1 : σ > 0.01
2

α = 0.05
Solution

3) Test Statistic

χ 2
=
( n − 1) s 2

0
σ 2
0
Solution
4) Decision Rule

Reject H 0 if
χ >χ
2
0
2
0.05 ,19
= 30.14
χ 2
0.05 ,19
= 30.14
Solution
5) Computation

19 ( 0.0153 )
χ =
2
0
= 29.07
0.01
Solution
6) Conclusion
Since,
χ = 29.07 < χ
2
0
2
0.05 ,19
= 30.14,
fail to reject H 0 because
there is no strong evidence
that the variance of fill volume
Solution
6) Conclusion

exceeds 0.01 sq fl oz. So there


is no strong evidence of a
problem with incorectly filled
bottles
Hypothesis Testing
on the Population
Proportion
It is often necessary to test
hypotheses on a population
proportion.
I n ma ny e n g i n e e r i n g
problems, we are concerned
with a random variable that
follows the binomial
distribution.
For ex a mple, c on s ider a
p ro d u c t i o n p ro c e s s t h a t
manufactures items that are
classified as either acceptable
or defective. It is usually
reasonable to model the
occurrence of defectives with
the binomial distribution
where the binomial
parameter p represents the
proportion of defective items
produced.
C o n s e q u e n t l y, m a n y
engineering decision
problems involve hypothesis
testing about p which will
consider testing
Hypotheses

H 0 : p = p0
H 1 : p ≠ p0
Summary

Null hypothesis: H 0 : p = p0
Test Statistic
X − np0
Z0 =
np0 ( 1 − p0 )
Summary
Rejection
H1 P-Value Criterion

p ≠ p0 P=2[1-𝚽(|z0|)]
z0>z𝛼/2
or z0<-z𝛼/2

p > p0 P=1-𝚽(z0) z0>z𝛼

p < p0 P=𝚽(z0) z0<-z𝛼


Example
A semiconductor manufacturer
pro d uc e s c ont rol lers u s e d i n
automobile engine applications. The
customer requires that the process
fallout or fraction defective at a
critical manufacturing step not
exceed 0.05 and that the
manufacturer demonstrate process
capability at this level of quality
using ︎ ︎ 0.05.
Example
The semiconductor
manufacturer takes a random
sample of 200 devices and
finds that four of them are
defective.
C a n t he ma nu f ac t u rer
demonstrate process
capability for the customer?
Solution

1)Parameter of Interest:
- the process fraction
defective p.
Solution
2) Hypotheses

H 0 : p = 0.05
H 1 : p < 0.05
Solution

3) Test Statistic
X − np0
Z0 =
np0 ( 1 − p0 )
Solution
4) Decision Rule

Reject H 0 if the p-value


is less than 0.05
Solution
5) Computation

4 − 200 ( 0.05 )
z0 = = −1.95
200 ( 0.05 ) ( 1 − 0.05 )
Solution
6) Conclusion
Since, z0 = −1.95, the p-value is
Φ ( −1.95 ) = 0.0256, so we reject
H 0 and conclude that the process
fraction defective p is less than
0.05.
Hypothesis Testing
for Goodness of Fit
When we do not know the
underlying distribution of the
population, and we wish to
test the hypothesis that a
particular distribution will be
satisfactory as a population
model, e.g., if the population
is normal; goodness-of-fit test
is used.
Test Statistic

(O − E )
2
k
χ =
2
0 ∑ i

Ei
i

i=1
with k - p - 1
degrees of freedom
1. The goodness-of-fit procedure
is based on the chi-square
distribution.
2. The test procedure require a
random same of size n from the
population whose probability
distribution is unknown.
3. These n observations are
arranged in frequency histogram
having k bins or class intervals.
4. O refers to the observed
frequency in the i class interval;
th

E refers to the expected


frequency in the i class interval.
th
Example
The number of defects in
printed circuit boards is
hy p ot h e s i s e d t o f low a
Poisson distribution. A
random sample of size 60
printed boards has been
collected and the following
number of defects observed:
Number of Observed
Defects Frequency
0 32
1 15
2 9
3 4
Solution
The estimate of the mean
nu m b e r of d e fe c t s p e r
board:

=
( 32* 0 + 15* 1 + 9* 2 + 4* 3 )
60
= 0.75
Solution
The Poison distribution:

( 0.75 )
−0.75 x
e
P( X = x ) =
x!

where,x = 0,1,2,3
The Expected Frequencies
(E=n*P)
Number of Expected
Probability
Defects Frequency
0 0.472 28.32
1 0.354 21.24
2 0.133 7.98
3 0.041 2.46
The Expected Frequencies
(E=n*P)
Number of Observed Expected
Defects Frequency Frequency
0 32 28.32
1 15 21.24
2 9 7.98
3(or more) 4 2.46
Notice that this expected
frequency is less than 3
The Expected Frequencies
(E=n*P)
Number of Observed Expected
Defects Frequency Frequency
0 32 28.32

1 15 21.24

2 (or more) 13 10.44


Thelas two cells are
combined
Solution

1)Parameter of Interest:
-the form of the distribution of
defects in printed circuit board
Solution
2) Hypotheses

H 0 : The form of the defect


is Poisson
H 1 : The form of the defect
is not Poisson
Solution

3) Test Statistic
(O − E )
2
k
χ =
2
0 ∑ i

Ei
i

i=1
Solution
4) Decision Rule

Reject H 0 if the P-value


is less than α = 0.05
Solution
degrees of freedom is
k-p-1 = 3-1-1=1

Significance level, 𝛂 = 0.05


Solution

χ 2
0 ( 0.05 ,1)
= 3.841
Similarly,

χ 2
0 ( 0.10 ,1)
= 2.71
Solution
5) Computation

( 32 − 28.32 ) ( 15 − 21.34 )
2 2

χ 2
0
= +
28.32 21.24
( 13 − 10.44 )
2

+ = 2.94
10.44
Solution
6) Conclusion
Since,
χ 2
0 ( 0.10 ,1)
<χ 2
0 ( computed )
<χ 2
0 ( 0.05 ,1)
,or
α = 0.05 < P − value < α = 0.1,
then, do not reject H 0 .
Solution
6) Conclusion

It means that the distribution


of defects in printed circuit
board is not Poisson
CONTINGENCY
PLAN
OBSERVED FREQUENCY
Columns 𝛴R
O11 O12 O13 O14 O15 𝛴R1
O21 O22 O23 O24 O25 𝛴R2
Rows O31 O32 O33 O34 O35 𝛴R3
O41 O42 O43 O44 O45 𝛴R4
O51 O52 O53 O54 O55 𝛴R5
𝛴(𝛴R)
𝛴C 𝛴C1 𝛴CT2 𝛴C3 𝛴C4 𝛴C5
+𝛴(𝛴C)
To determine ERC
Eij =
∑ ( O ) x ∑ (O
any row ) any column

∑ ( ∑ R) + ∑ ( ∑ C )
where,
i, j = 1, 2, 3,! , n

Example:
E11 =
∑ ( row1) ∑ ( Column1)
∑ ( all rows ) + ∑ ( all columns )
Contingency Table
Columns
O11 O12 O13 O14 O15
E11 E12 E13 E14 E15
O21 O22 O23 O24 O25
E21 E22 E23 E24 E25
Rows O31 O32 O33 O34 O35
E31 E32 E33 E34 E35
O41 O42 O43 O44 O45
E41 E42 E43 E44 E45
O51 O52 O53 O54 O55
E51 E52 E53 E54 E55

You might also like