You are on page 1of 86

4-1 Statistical Inference

• The field of statistical inference consists of those


methods used to make decisions or draw
conclusions about a population.

•These methods utilize the information contained in


a sample from the population in drawing
conclusions.
統計推論:模式的建立
物理模式
Mechanistic model

統計推論模式
Empirical model

5
1-2 Collecting Engineering Data
1-2.4 Random Samples

資料的列舉
資料的分析

母體的推論
4-1 Statistical Inference
Introduction
Introduction
4-2 Point Estimation
4-2 Point Estimation
• Linear combination
X 1  X 2  ...  X n
X
n
1 1 1 1
E ( X )  E ( X 1 )  E ( X 2 )  ...  E ( X n )   n  
n n n n
1 1 1 1
V ( X )  2 V ( X 1 )  2 V ( X 2 )  ...  2 V ( X n )  2  n   2
n n n n
E( X )  
E( X )  
 2
V (X )   2
n V (X ) 
n
• For independent, normal distribution
random variables
V ( X i )   ... ( x1   ) 2 f X 1 X 2 ... X p ( x1 , x2 ,..., x p )dx1dx2 ...dx p   2

 12 p  12 p  f X1 X 2 ... X p ( x1 , x2 ,..., x p )dx1


2
x1 f X X ... X ( x1 , x 2 ,..., x p ) dx1  2  x1 f X X ... X ( x1 , x 2 ,..., x p ) dx1   2

 E ( X i )   2   2
2

2
E( X )    i
2 2 2
V (X ) 
n
 2
 2
 E ( X 2 )   2 
n E( X )   2
2

n
Example 證明樣本標準差平方是母體變異數的不偏估計量
Example: Standard deviation

Central limit theorem X 


Z
S n
Question
• Can we show that the sample standard
deviation S is an unbiased estimator of the
population standard deviation σ?

 n 
  (Xi  X ) 
2

E(S )  E  i 1   ?
 n 1 
 
 
Not only one unbiased estimators
4-2 Point Estimation
E( X )  
2
V (X ) 
n

E( X )    
i
2 2 2

 2
E( X ) 
2
 2

n
ˆ )  E ( 
MSE(  ˆ  θ) 2 
 
ˆ )  E[
MSE ( ˆ  E (
ˆ )]2  [  E (
ˆ )]2  V (
ˆ )  (bias) 2

MSE( X )  E ( X   )  V ( X )
2
General Concepts of Point Estimation
7-3.4 Mean Square Error of an Estimator

Figure 7-6 A biased estimator ̂1 that has smaller variance


ˆ .
than the unbiased estimator  2
General Concepts of Point Estimation

Mean Square Error of an Estimator


平均方差
Definition

ˆ )  E[
MSE ( ˆ  E (
ˆ )]2  [  E (
ˆ )]2  V (
ˆ )  (bias) 2
General Concepts of Point Estimation

Mean Square Error of an Estimator


Example
General Concepts of Point Estimation
Standard Error ( 標準誤 ): Reporting a Point
Estimate
Standard error: the standard deviation of a
Definition sampling distribution

標準誤差估計值
Standard error vs.
Estimated standard error

Std. Error

Estimated Std. Error


Population difference

Central limit theorem

Std. Error
Central limit theorem
S1~S2 X 1  X 2  ( 1   2 )
Z
(n1  1) S  (n2  1) S
1
2 2
2
n1  n2  2
Estimated Std. Error
For p1-p2

Hint: Binomial distribution: expected value=np, variance=np(1-p)


1 2 1 2 n1 p1 (1  p1 ) n2 p2 (1  p2 )
 2 p1  p2  2
1  2  2  2

n1 n2 n1 n22

Central limit theorem Std. Error


Large sample size pˆ1  pˆ 2  ( p1  p2 )
Z
pˆ1 (1  pˆ1 ) pˆ 2 (1  pˆ 2 )

n1 n2 Estimated Std.
Error
4-2 Point Estimation

Estimated Std. Error


S
n

pˆ (1  pˆ )
n
( n1  1) S12  ( n2  1) S22
n1  n2  2

pˆ 1 (1  pˆ 1 ) pˆ 2 (1  pˆ 2 )

n1 n2
Exercise 4-6 & 4-8
Exercise 4-14
4-3 Hypothesis Testing

4-3.1 Statistical Hypotheses


We like to think of statistical hypothesis testing as the
data analysis stage of a comparative
experiment, in which the engineer is interested,
for example, in comparing the mean of a population to
a specified value (e.g. mean pull strength).
4-3 Hypothesis Testing

4-3.1 Statistical Hypotheses


For example, suppose that we are interested in the
burning rate of a solid propellant used to power aircrew
escape systems.
• Now burning rate is a random variable that can be
described by a probability distribution.
• Suppose that our interest focuses on the mean burning
rate (a parameter of this distribution).
• Specifically, we are interested in deciding whether or
not the mean burning rate is 50 centimeters per second.
4-3 Hypothesis Testing

4-3.1 Statistical Hypotheses


Two-sided Alternative Hypothesis

One-sided Alternative Hypotheses


4-3 Hypothesis Testing

4-3.1 Statistical Hypotheses


Test of a Hypothesis
• A procedure leading to a decision about a particular
hypothesis

• Hypothesis-testing procedures rely on using the information


in a random sample from the population of interest.

• If this information is consistent with the hypothesis, then we


will conclude that the hypothesis is true; if this information is
inconsistent with the hypothesis, we will conclude that the
hypothesis is false.
4-3 Hypothesis Testing

4-3.2 Testing Statistical Hypotheses


4-3 Hypothesis Testing

4-3.2 Testing Statistical Hypotheses


4-3 Hypothesis Testing

4-3.2 Testing Statistical Hypotheses

Sometimes the type I error probability is called the


significance level ( 顯著程度 ), or the -error,
or the size of the test.
4-3 Hypothesis Testing

4-3.2 Testing Statistical Hypotheses


5.74% of all random
  2.5
variables would lead to
 2.5
reject H0
  0.79
n 10
α can be reduced by
Pushing the critical regions
48.5  50
( ) or increasing the sample size
0.79
α error
• To denote the significance of our test result
– Critical region and sample size
4-3 Hypothesis Testing

4-3.2 Testing Statistical Hypotheses

Alternative
hypothesis

  0.2643

48.5  52
z1 
0.79 51.5  52
z2 
48.5 0.79
51.5
4-3 Hypothesis Testing

4-3.2 Testing Statistical Hypotheses

  2.5
 2.5
  0.79
n 10
  0.8923

48.5  50.5 51.5  50.5


z1  z2 
0.79 0.79

50.5 10
4-3 Hypothesis Testing

4-3.2 Testing Statistical Hypotheses

  2.5
 2.5
  0.625
n 16
  0.2119

48.5  52 51.5  52
z1  z2 
0.625 0.625

52 16
β error
• To denote how we can detect the difference
between the true mean and the value
specified in the null hypothesis
– True mean and sample size
4-3 Hypothesis Testing

4-3.2 Testing Statistical Hypotheses

Please verify this result


Important points
1. The size of the critical region and, consequently, the
probability of a type I error α, can always be reduced
by appropriate selection of the critical values.
2. Type I and type II errors are related. A decrease in the
probability of one type of error always results in an
increase in the probability of the other, provided that
the sample size n does not change.
3. An increase in sample size will generally reduce both α
and β provided that the critical values are held
constant.
4. When the null hypothesis is false, β increases as the
true value of the parameter approaches the value
hypothesized in the null hypothesis. The value of β
decreases as the difference between the true mean and
the hypothesized value increases.
Summary
• Selection of critical value
– α can directly be controlled
– Reject H0  Strong conclusion α = 0.05
– α is a measure of risk
• Type I and type II errors are related. A
decrease of one type of error always results in
an increase in probability of the other, if
sample size does not change
• An increase in sample size will reduce both α
and β, if critical values are held constant
• β vs. the difference between true value of
parameter and the null hypothesis.
4-3 Hypothesis Testing

4-3.2 Testing Statistical Hypotheses

• The power is computed as 1 - , and power can be interpreted as


the probability of correctly rejecting a false null
hypothesis. We often compare statistical tests by comparing their
power properties.
Power is a measure of sensitivity to detect the difference
• For example, consider the propellant burning rate problem when
we are testing H 0 :  = 50 centimeters per second against H 1 :  not
equal 50 centimeters per second . Suppose that the true value of the
mean is  = 52. When n = 10, we found that  = 0.2643, so the
power of this test is 1 -  = 1 - 0.2643 = 0.7357 when  = 52.
4-3 Hypothesis Testing

4-3.3 One-Sided and Two-Sided Hypotheses


Two-Sided Test:

One-Sided Tests:
4-3 Hypothesis Testing

4-3.3 P-Values in Hypothesis Testing

Credibility
Weight of evidence

The risk of wrongly


rejecting H0
Formulating the hypothesis
• Always state H0 as “equality” (=)
– For one-side alternative hypothesis, see
footnote on page 157.
• H1: one- or two-sided, depending on the
conclusion to be drawn if H0 is rejected
– One side: “greater than”, “at least”, “superior
to”, “exceeds”, less than”
– Two side: “not equal to”
4-3 Hypothesis Testing

4-3.5 General Procedure for Hypothesis Testing


4-4 Inference on the Mean of a Population,
Variance Known

Assumptions
4-4 Inference on the Mean of a Population,
Variance Known

4-4.1 Hypothesis Testing on the Mean

We wish to test:

The test statistic is:


4-4 Inference on the Mean of a Population,
Variance Known

4-4.1 Hypothesis Testing on the Mean

Reject H0 if the observed value of the test statistic z0 is


either:
or
Fail to reject H0 if
4-4 Inference on the Mean of a Population,
Variance Known

4-4.1 Hypothesis Testing on the Mean


4-4 Inference on the Mean of a Population,
Variance Known
4-4.1 Hypothesis Testing on the Mean
A real world problem
• Page 167
– To make sure the bottles meet the specification on
mean internal pressure is a minimum strength of
200 psi.
– H0: μ = 200
– H1: μ > 200, the spec. is met when H0 is rejected
• in case that the bottle manufacturer’s past performance
is not good, or the 200 psi is a strict limitation.
– H1: μ < 200, the spec. is met when H0 would fail to
be rejected
• in case that the bottle manufacturer’s past performance
is good, or the small deviations from are not harmful
Exercise 4-3
Exercise 4-3
4-4 Inference on the Mean of a Population,
Variance Known

4-4.2 Type II Error and Choice of Sample Size

Finding The Probability of Type II Error 


Type II Error and Choice of Sample Size
Finding the Probability of Type II Error 
Type II Error and Choice of Sample Size
Finding the Probability of Type II Error 
9-2 Tests on the Mean of a Normal
Distribution, Variance Known
9-2.2 Type II Error and Choice of Sample Size
Finding the Probability of Type II Error 

Figure 9-7 The distribution of Z0 under H0 and H1


4-4 Inference on the Mean of a Population,
Variance Known
4-4.2 Type II Error and Choice of Sample Size
Sample Size Formulas
4-4 Inference on the Mean of a Population,
Variance Known
4-4.2 Type II Error and Choice of Sample Size
Sample Size Formulas
4-4 Inference on the Mean of a Population,
Variance Known
4-4.2 Type II Error and Choice of Sample Size
4-4 Inference on the Mean of a Population,
Variance Known
4-4.2 Type II Error and Choice of Sample Size
4-4 Inference on the Mean of a Population,
Variance Known
4-4.3 Large Sample Test

In general, if n  30, the sample variance


s2 will be close to σ2 for most samples,
and so s can be substituted for σ in the
test procedures with little harmful effect.
4-4 Inference on the Mean of a Population,
Variance Known
4-4.4 Some Practical Comments on Hypothesis
Testing
The Seven-Step Procedure
Only three steps are really required:
4-4 Inference on the Mean of a Population,
Variance Known
4-4.4 Some Practical Comments on Hypothesis
Testing
Statistical versus Practical Significance
4-4 Inference on the Mean of a Population,
Variance Known
4-4.4 Some Practical Comments on Hypothesis
Testing
Statistical versus Practical Significance

Even if there is a little practical difference between


the true mean and the hypothesized value, a large
sample size will always lead to rejection of H0
4-4 Inference on the Mean of a Population,
Variance Known
4-4.5 Confidence Interval on the Mean

Two-sided confidence interval:

One-sided confidence intervals:

Confidence coefficient:
4-4 Inference on the Mean of a Population,
Variance Known
4-4.5 Confidence Interval on the Mean
4-4 Inference on the Mean of a Population,
Variance Known
4-4.6 Confidence Interval on the Mean
4-4 Inference on the Mean of a Population,
Variance Known
4-4.5 Confidence Interval on the Mean
4-4 Inference on the Mean of a Population,
Variance Known
4-4.5 Confidence Interval on the Mean
Relationship between Tests of Hypotheses and
Confidence Intervals
If [l,u] is a 100(1 - ) percent confidence interval for the
parameter, then the test of significance level  of the
hypothesis

will lead to rejection of H0 if and only if the hypothesized


value is not in the 100(1 - ) percent confidence interval
[l, u].
4-4 Inference on the Mean of a Population,
Variance Known
4-4.5 Confidence Interval on the Mean
Confidence Level and Precision of Estimation
The length of the two-sided 95% confidence interval is

whereas the length of the two-sided 99% confidence


interval is
4-4 Inference on the Mean of a Population,
Variance Known
4-4.5 Confidence Interval on the Mean
Choice of Sample Size
4-4 Inference on the Mean of a Population,
Variance Known
4-4.5 Confidence Interval on the Mean
Choice of Sample Size
4-4 Inference on the Mean of a Population,
Variance Known
4-4.5 Confidence Interval on the Mean
Choice of Sample Size
4-4 Inference on the Mean of a Population,
Variance Known
4-4.5 Confidence Interval on the Mean
One-Sided Confidence Bounds
4-4 Inference on the Mean of a Population,
Variance Known
4-4.6 General Method for Deriving a Confidence
Interval
4-40
Benzene is a toxic chemical used in the manufacturing of
medicinal chemicals, dyes, artificial leather, and linoleum. A
manufacturer claims that its exit water meets the federal
regulation with a mean of less than 7980 mg/l of benzene. To
assess the benzene content of the exit water, 10 independent
water samples were collected and found to have an average of
7906 mg/l of benzene. Assume a known standard deviation of
80 mg/l and use a significance level of 0.01.
a) Test the manufacturer’s claim. Use the P-value
approach.
b) What is the β value if the true mean is 7920?
c) What sample size would be necessary to detect a true
mean of 7920 with a probability of at least 0.90?
d) Find a 99% one-sided upper confidence bound on the
true mean.
e) Use the CI found in part(d) to test the hypothesis.
4-46. Suppose that in Exercise 4-43 it is desired
to estimate the compressive strength with an
error that is less than 15 psi at 99% confidence.
What sample size is required?

You might also like