Statistical Analysis Notes

advertisement
ARG/PDW: MCEN4027F00
III: 1
APPLIED STATISTICAL ANALYSIS
Introduction
Variability in the Measurement versus Variability in the
Population Under Study
In carrying out experiments we utilize measurement systems that
interact with the physical system being studied.
As a result of this interaction, we are able to estimate the value
of various physical parameters.
We then use the measured results to evaluate hypotheses concerning
the system under study.
To test our hypotheses we must be able to assess the quality of
the measurements, i.e., we must be able to estimate whether the
measurements are in error, and if so, by how much.
Otherwise, we are not able to make a legitimate decision
regarding the hypotheses.
ARG/PDW: MCEN4027F00
III: 2
Uncertainty analysis results in a statement regarding variability
introduced by the measurement system (due to noise or resolution
limits), NOT variability in the sample or population being studied.
Uncertainty analysis can be used to:
 Control systematic errors (through calibration);
 Guide the investigator as to which of a number of possible
measurement techniques may be best;
 Obtain improvement in the overall accuracy of a measurement
by reducing variability in certain critical parameters.
Our goal is make the uncertainty in the measurement (system) as
small as possible.
ARG/PDW: MCEN4027F00
III: 3
Basic Concepts
Continuous Random Variables and Distributions
A continuous random variable X is the set of all possible numbers
over a given interval, e.g. A  X  B.
The probability distribution (density function) f(x) of continuous
random variable X is
b

a

Pa  X  b    f  x dx where  f  x dx  1
The cumulative distribution function F(x) for continuous random
variable X is
x
F  x   P X  x    f  x dx

This integral represents the area under the curve, f(x), from - to
x so that
Pa  X  b   F b   F a 
ARG/PDW: MCEN4027F00
III: 4
Mean and Variance
The expected value of x, E(x), is the mean value of x, designated by
the symbol 

E  x    xf  x dx  

The variance of x, V(x) is defined as

V  x     x    f  x dx   2

 
We can show that V  x   E x 2   2
Normal Distribution
The normal or Gaussian distribution is defined by the continuous
density function:
f x 
1
e
2 
1 x 
 

2  
2
for -<x< where -<< and  >0.
The distribution is symmetric about x =  so  is the mean value
of x.
In addition, we can show that V(x) is equal to 2, and  is
defined as the standard deviation of the normal distribution
function.
Various members of the normal family are shown in the figures.
ARG/PDW: MCEN4027F00
III: 5
ARG/PDW: MCEN4027F00
III: 6
In the special case where =0 and =1 we transform f(x) to the
standard normal distribution fz(z) for -<z<:
1 z2 2
e
2
A figure showing the standard normal density function with
some corresponding important probabilities is shown below:
f z z  
68% of the population lies within  1
95% of the population lies within  2
99.7% of the population lies within  3
ARG/PDW: MCEN4027F00
III: 7
Nonstandard Normal Distributions
Probabilities involving X of a nonstandard normal distribution can be
obtained by relating X to the normal distribution variable Z using
X 
Z

In this way tables for standard normal distributions can be used
to determine probabilities for non-standard normal distributions.
b
a
b   
a
Pa  X  b   P
Z
  
  

 
 
  
  
Example
The reaction time of drivers to a break light from a vehicle in front of
theirs is modeled as a normal distribution with a mean and standard
deviation of 1.25 an 0.46 s, respectively. What is the probability of a
reaction time between 1 and 2 s?

X

X
Standardize by writing:  min
 Z  max





For Xmin =1 and Xmax =2, we obtain -0.543 < Z < 1.630
Then P(1 < X < 2) = P(-0.543 < Z < 1.630)
= (1.630) - (-0.543)
= 0.948 – 0.294 = 0.654
ARG/PDW: MCEN4027F00
III: 8
Hypothesis Testing
A statistical hypothesis is a conjecture regarding a random variable or
the probability distribution of a random variable.
Testing a statistical hypothesis involves:
 Determination of a test statistic
 Utilization of a sample value of the test statistic to
choose between a given hypothesis, termed the null
hypothesis (Ho), and a competing hypothesis, termed the
alternative hypothesis (Ha).
Implicit in the formulation of a testing procedure is the recognition
that a statistic is a random variable defined as a function of several
random variables X1, X2, …. Xn comprising a random sample, so that
V  V  X1, X 2 ,...... X n 
The testing procedure is to observe V and, based upon the
observation, decide which hypothesis, Ho or Ha, is to be adopted.
In terms of the sampling distribution of the test statistic V, two
regions are defined:
 The acceptance region, comprised of those values of V
resulting in the adoption of Ho;
 The rejection (critical) region, comprised of those values
of V resulting in the adoption of Ho.
ARG/PDW: MCEN4027F00
III: 9
Since there are competing hypotheses regarding the population
random variable X, the distribution of the test statistic V is not
fully known.
Indeed, it is the observation of V that is to lead to a decision
regarding which hypothesis is to be adopted.
For instance, let X be given as a f(x;) where the unknown
parameter  possesses one of two values, o or a.
The choice as to which value of  to accept is determined
by an observation of the test statistic.
The choices can be represented by
Ho:  = o
Ha:  = a
The possible outcomes of the chosen test statistic are
divided into two mutually exclusive classes: those in the
acceptance region A and those in the rejection region C.
Upon observation, if V falls in A, then Ho is accepted; if V
falls in C, then Ho is rejected.
ARG/PDW: MCEN4027F00
III: 10
Example
Having purchased a shipment of synthetic rubber seals for disk-brake
calipers, a truck manufacturer suspects that substandard seals have
been substituted for the ones ordered. From experience, the
manufacturer knows that, when subjected to rigorous testing
conditions, only 10% of the ordered seals will fail but 30% of the
substandard seals will fail. To detect whether or not there has been a
bogus shipment, the manufacturer plans to test 20 seals and make a
determination based upon the number of brake failures due to seal
rupture.
From the perspective of hypothesis testing, there is a population
described by a random variable X, with p, the probability of failure
being unknown. Assuming the shipment to be large in number, the
sampling procedure can be treated as random. If the test statistic V
counts the number of seals that fail the testing procedure, then
V = X1 + X2 + ….. X20
where X1 + X2 + ….. X20 comprise a random sample, and the sampling
distribution of V has parameters n =20 and p. The two competing
hypotheses can be described by
Ho: p = 0.3
Ha: p = 0.1
The null hypothesis represents the conjecture that there has been
a bogus shipment.
ARG/PDW: MCEN4027F00
III: 11
Having chosen a test statistic, the next problem is to determine a
critical region. The greater the number of failures, the more reason
there is to accept the null hypothesis; the fewer the failures, the more
reason there is to reject the null hypothesis and accept the alternative
hypothesis that the seals shipped are the genuine ones ordered.
A reasonable choice for the critical region might be
C = {0,1,2,3,4}
where up to 4/20 or 0.2 of the test seals fail. The corresponding
acceptance region would be
A = {5,6, …..20}
If 4 or fewer seals fail the test, then the manufacturer
rejects the null hypothesis and accepts the alternative
hypothesis. On the other hand, if 5 or more seals fail, then
the manufacturer accepts the null hypothesis that there has
been a bogus shipment.
Now suppose 20 seals are subjected to testing and only 3 fail. Then
according to the hypothesis test just designed, the manufacturer
rejects the null hypothesis and concludes the shipment does not
consist of substandard seals.
Is the manufacturer certain of this conclusion? No!
The conclusion is an inference based upon the outcome of an
experiment. A different outcome might yield a different
inference.
ARG/PDW: MCEN4027F00
Rejection Regions for the Normal Distribution
III: 12
ARG/PDW: MCEN4027F00
III: 13
Two Types of Error
Type I Error: An error of type I occurs if the null hypothesis Ho
reflects the true state of nature but the test statistic falls into the
critical region, thereby leading to a rejection of Ho.
Type II Error: An error of type II occurs if the null hypothesis Ho
does not reflect the true state of nature but the test statistic falls into
the acceptance region, thereby leading to an acceptance of Ho.
True State of Nature
Decision
Reject Ho
Ho
Type I error
H1
Correct decision
Accept Ho
Correct decision
Type II error
There are always errors in testing: Our goal is to minimize both type I
and type II errors.
The probability of a type I error is denoted by .
The probability of a type II error is denoted by .
In an experiment in which statistics will be employed, one
always sets the desired values of  and  in the design
protocol before any experimentation has been initiated.
ARG/PDW: MCEN4027F00
III: 14
Selection of the Null and Alternative Hypotheses
A common issue that arises in practical applications is whether to
conduct a one- or two-tailed test.
The decision depends on what one wants to detect.
Example
Suppose you operate a chemical plant that produces a variable
amount y of product per day and if , the mean value of y, s less than
100 tons/day, you will eventually be bankrupt.
If  exceeds 100 tons/day, you are financially safe.
In order to determine whether your process is leading to financial
disaster, you will want to detect whether  < 100 tons, and you will
conduct a one-tailed test of Ho:   100 versus H1:  < 100.
If you were to conduct a two-tailed test for this situation, you would
reduce your chance of detecting values of  less than 100 tons, i.e.,
you would increase the values of  for alternative values of  < 100
tons.
ARG/PDW: MCEN4027F00
III: 15
Example
Suppose you have designed a new drug so that its mean potency is
some specific level, say 10%.
As the mean potency tends to exceed 10%, you lose money.
If it is less than 10% by some specified amount, the drug becomes
ineffective as a pharmaceutical (you lose money).
To conduct a test of the mean potency  for this situation, you would
want to detect values of  either larger or smaller than  = 10.
Consequently, you would select H1:   10 and conduct a two-tailed
statistical test.
These examples demonstrate that a statistical test is an attempt to
detect departure from the null hypothesis; the key to the test is to
define the specific alternatives that you wish to detect.
It should be stressed, however, that Ho and H1 should be constructed
prior to obtaining and observing the sample data.
If you use information in the sample to aid in selecting the
hypotheses, the prior information gained from the sample biases
the test results; specifically, the true probability of a Type I error
will be larger than the preselected value of .
Download