0% found this document useful (0 votes)
0 views

Lecture 09

The document discusses hypothesis testing, illustrating how to verify a manufacturer's claim about the yield strength of construction materials through sample testing. It explains the concepts of null and alternative hypotheses, significance levels, and the potential for Type I and Type II errors. Additionally, it covers the procedures for conducting tests with known and unknown variances, including the use of Z-tests and T-tests.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
0 views

Lecture 09

The document discusses hypothesis testing, illustrating how to verify a manufacturer's claim about the yield strength of construction materials through sample testing. It explains the concepts of null and alternative hypotheses, significance levels, and the potential for Type I and Type II errors. Additionally, it covers the procedures for conducting tests with known and unknown variances, including the use of Z-tests and T-tests.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

CE 207

Applied Mathematics for Engineers


Course Teacher: Dr. Md. Hadiuzzaman
Room No. 544, Civil Building
(Lecture 9)
Hypothesis Testing
The following is an example of testing particular hypothesis:
“A construction firm has purchased large supply of MS bars that
have been guaranteed to have a yield strength of 60000 psi. To
verify this claim, the firm takes 10 random samples of bar for
testing. They will use this test result to decide whether or not they
accept the maufacturer’s claim that the population mean is at least
60000 psi.”
Let us consider the hypothesis that mean <1. Now if the sample
mean is say 1.2, do we reject the hypothesis? Maybe we do not. But
say the sample mean is 3.0, then certainly we reject the hypothesis.
In accepting a hypothesis, we just do not say it is true, rather we say
that the data appear to be consistent with hypothesis
Hypothesis Testing (contd.)
The classical way of accepting a hypothesis is to check the
probability not being greater than a specified level . The value  is
called the level of significance of test, usually set in advance, to
values such as =0.1, 0.05, 0.005 etc. The level of significance
represents the very small chance of picking data which are ‘far away
from the mean’ data.
Example:
The test of a hypothesis that the mean of a normal (,1) population
is equal to 1, calls for rejection if the sample average is farther than
1.96/n away from 1. The value of 1.96/n is chosen to meet a
level of significance of =0.05.
 
Note here, the interval X − 1.96 to X + 1.96 is known as a 95%
n n
confidence interval estimate of population mean .
Hypothesis Testing (contd.)
•The original hypothesis is also known as the
null hypothesis, denoted by H0
•Null hypothesis, H0: μ = a given value.
(It is the hypothesis to be tested)
•Alternative hypothesis, H1: μ ≠ the given
value.
(It is a statement of what we believe is true if
our sample data cause us to reject the null
hypothesis)
Hypothesis Testing (contd.)
In general, the practical approach for hypothesis testing deals
with the task of either accepting or rejecting hypothesis H0 on
the basis of a sample from the population.

Type I and Type II Errors:


When conducting hypothesis tests, two types of error may
occur as summarized below
Reality Our decision
We accept H0 We reject H0
H0 correct Correct! TYPE I ERROR
H0 incorrect TYPE II ERROR Correct!
Hypothesis Testing (contd.)
• Two sided test (μ0 = a given value):
H0: μ = μ0 versus H1: μ ≠ μ0

• One sided test (μ0 = a given value):


H0: μ = μ0 versus H1: μ < μ0
H0: μ = μ0 versus H1: μ > μ0
Hypothesis Testing (Contd.)
CASE OF KNOWN VARIANCE
Let X1, X2, …Xn be a sample of size n from a population with
normal distribution having an unknown mean  but known
variance 2.
Let us consider the null hypothesis H0: = 0 against the
alternative hypothesis H1: 0.
Since sample mean X is a natural point estimator of , it
seems reasonable to accept H0 if X is not too far from 0.
In our hypothesis testing, we fix a significance level , then
we estimate the critical value c in the following equation that
 
will make type I error equal to : P X −  0  c = 
Hypothesis Testing (Contd.)
CASE OF KNOWN VARIANCE (contd.)
When = 0, X will be normally distributed with mean 0 and
variance 2/n. Hence Y defined by: X − 0
Y=
 n
will have a standard normal distribution.
 X −  0 c n 
Required condition, P    =
  n  
 c n
i.e., P  Y   =
  
 c n  c n 
i.e., 2 P  Y   = i.e., P  Y  =
      2
Hypothesis Testing (Contd.)
CASE OF KNOWN VARIANCE (contd.)
Required condition,
X − 0
PY  y 2  =  2 Y=
 n
c n
i.e., = y 2

y 2
i.e., c =
n
Reject H0 if X − 0  c
X − 0
i.e.,  y / 2
 n
Here, y/2 is obtained from table A1 corresponding to known level
of significance, . (two-sided test)
Hypothesis Testing (Contd.)
CASE OF KNOWN VARIANCE (contd.)
If we would have chosen a test with a 10% chance of
rejecting H0 when H0 is true, i.e., =0.10, then in the
previous problem, the hypothesis would have been
rejected.
If rejecting H0 would result in large costs, then we
might be conservative and choose a lower level of
significance such as =0.05 or 0.01. Also if we feel
strongly that H0 is correct, we may think same.
We have been talking about Type I error here.
Z-Test: When Population Variance is Known
Note:
Hypothesis Testing (Contd.)
CASE OF UNKNOWN VARIANCE
Let X1, X2, …Xn be a sample of size n from a population with normal
distribution having an unknown mean  and unknown variance 2.
Let us consider the null hypothesis H0: = 0 against the alternative
hypothesis H1: 0.
The null hypothesis is not a simple hypothesis since it does not
specify the value of 2.
As before, it seems reasonable to reject H0 if the sample mean is far
from 0. How far is determined by the population variance 2. Since
2 is unknown, one approach will be to use sample variance s2. This
leads to the use of t-distribution, hence the t-test is needed.
Hypothesis Testing (Contd.)
CASE OF UNKNOWN VARIANCE
 (X −X)
n
2
i
Estimate sample variance S2 = i =1
n −1

X − 0
and then reject H0 if S n is large

X − 0
The statistic defined by has when =0 a t-distribution
S n
with n-1 degrees of freedom.
 X − 0 
Hence, P − t / 2,n −1   t / 2,n −1  = 1 − 
 S n 
where t / 2,n −1 is the 100/2 upper percentile value of the t - distribution with n - 1 dof.

Accept H0 if X −  0  t
 / 2 , n −1
S n
T-Test: When Population Variance is Unknown

You might also like