Review of Basic Statistics

advertisement
Review of Basic Statistics
Definitions
• Population - The set of all items of interest in a
statistical problem
e.g. - Houses in Sacramento
• Parameter - A descriptive measure of a population
e.g. - Mean (average) appraised value of all houses
• Sample - A set of items drawn from a population
e.g. - 100 randomly selected homes
• Statistic - A descriptive measure of a sample
e.g. - Mean appraised value of selected homes
• Statistical inference - The process of making an
estimate, prediction, or decision based upon sample
data
Types of Data
• Qualitative - Categorical, i.e., data
represents categories
e.g. - Existence of an attached garage
• Quantitative - Data are numerical values
Discrete(countable) - Counts of things
e.g. - Number of bedrooms
Continuous(interval) - Measurements
e.g. - Appraised value or square footage
• Cross-sectional - Observations in a sample
are collected at the same time.
e.g. - Our sample of 100 homes; most
surveys
• Time series - Data is collected at successive
points in time
e.g. - Housing starts, recorded monthly from
July 1985 to June 1997
Numerical Descriptive Measures:
Notation
• N = Size of Population
• n = size of sample
•  = Population Mean
• x = sample mean
2
•  = Population Variance
•  = Population Standard Deviation
• s2 = sample variance
• s = sample standard deviation
Sample Mean,
x
n
x
 xi
i 1
n
• where x i = i th observation, and
• n = sample size
Sample Variance, s
n
s 
2
 ( xi  x )
i 1
n 1
2
2
Example
• Find the mean and variance of the following
sample values (in years):
3.4, 2.5, 4.1, 1.2, 2.8, 3.7
Random Variables
• Definition - A numerical variable whose
value is determined by chance!
e.g. - For a randomly selected house:
Let X = Appraised value
Y = Number of bedrooms
1 for attached garage
W= 

0 otherwise

Then X, Y, and W are all random variables.
(Why?)
Note - Let X be a random variable, then
X , S2 and S are also random variables
What is the difference between
X, X , S2, S and x, x , s2, s ?
Probability Distributions
• Definition - A probability distribution for a
random variable describes the values that
the random variable can assume together
with the corresponding probabilities.
• Importance - Its probability distribution
describes the behavior of a random variable.
Therefore, questions concerning a random
variable cannot be answered without
reference to its probability distribution.
Normal Distributions
0.4
density
0.3
Mean,
Std. dev.
,
0.2
0.1
0
-3 -2 -1  +1 +2 +3
X
Empirical (68, 95, 99.7) Rule
• For a normally distributed random variable:
i) Approx. 68% of the values lie within 1
standard deviation, , of the mean , i.e.,
P(- < X < +) = 0.68
ii) Approx. 95% lie within 2  of .
P(-2 < X < +2) = 0.95
iii)Approx. 99.7% lie within 3  of .
P(-3 < X < +3) = 0.997
Standard Normal Distribution
0.4
density
0.3
Mean,
Std. dev.
0,1
0.2
0.1
0
-3
-2
-1
0
Z
1
2
3
Examples
Determine the following:
a. P(0 < Z < 1.46)
b. P(Z > 1.46)
c. P(1.28 < Z <1.46)
d. P(Z < -1.28)
Solutions
Using a table or Excel:
a. P(0 < Z < 1.46) = 0.4279
b. P(Z > 1.46) = 0.5 - 0.4279 = 0.0721
c. P(1.28 < Z <1.46) = 0.4279 - 0.3997 = 0.0282
d. P(Z < -1.28) = P(1.28 < Z) = 0.5 - 0.3997 =
0.1003
Example
Use a table or Excel, find and interpret z0.05
P(Z > z0.05 ) = 0.05
Ans.
z0.05 = 1.645 because P(Z > 1.645) = 0.05
z – scores and
standardized random variables
For a random variable X with mean  and
standard deviation ,
the number of standard
x
z
= deviations above or below the

mean x is.
X   is the Standardized Random
Z
Variable for X

the Distribution of
X
(the Sampling Distribution of the Mean)
Properties of X : Let  X = mean of all sample
means of size n
 2 X = variance of all sample
means of size n
Then:
i) X = 
ii) 

=
n
2
2
X
the Central Limit Theorem
I. Central Limit Theorem - If a large sample is
drawn randomly from any population, the
distribution of the sample mean, X , is at
least approximately normal!
II. Properties of X
1.  X  
2.  2 X  
2
n
3. If X is normally distributed, then X is
normal regardless of the size of the sample!
Example (filling problem)
Suppose that the amount of beer in a 16 oz
bottle is normally distributed with a mean of
16.2 oz and a standard deviation of 0.3 oz.
Find the probability that a customer buys
a. one bottle and the bottle contains more than
16 oz.
b.four bottles and the mean of the four is
more than 16 oz .
Let X = amount of beer in a bottle.
X  16.2 16  16.2

a. P ( X  16)  P 





0.3
0.3

P Z   2 3  0.2487 + 0.5  0.7487


X

162
.
16

162
.

 
P
(
X

16
)

P

b.
 03

.
03
.

4
4 


P Z   4 3  0.4082 + 0.5  0.9052
Suppose you randomly selected 36 bottles
and, after carefully measuring the amount of
beer each contains, you determine that the
mean amount for the sample is less than 16
oz. What would you conclude? Why?




X

162
.
16

162
.
P( X  16)  P


 0.3

0.3

36
36 
P Z   4  0
+
Inference-Confidence Intervals
Let X be a random variable with mean  and
standard deviation .
Suppose that X is normally distributed OR the
a sample is large (n > 30), then X is at least
approximately normal with mean X  

and standard deviation  X 
n
A. Logic
Distribution of X
0.4
0.3
0.2
Mean,Std.
dev.
,  x
0.1
0
 3 x  2 x   x 
 + x  +2 x  +3 x
A. Logic
Distribution of X
0.4
0.3
Mean,Std.
dev.
,  x
0.2
0.1
0
  x

 + x
A. Logic
Distribution of X
0.4
0.3
Mean,Std.
dev.
,  x
0.6834
0.2
0.1
0
  x

 + x
A. Logic
Distribution of X
0.4
0.3
Mean,Std.
dev.
,  x
0.2
0.1
0
 2 x

 +2 x
A. Logic
Distribution of X
0.4
0.3
0.2
Mean,Std.
dev.
,  x
0.9544
0.1
0
 2 x

 +2 x
A. Logic
Distribution of X
0.4
0.3
Mean,Std.
dev.
,  x
0.2
0.1
0
 3 x

 +3 x
A. Logic
Distribution of X
0.4
0.3
Mean,Std.
dev.
,  x
0.2
0.1
0
 3 x
0.9974

 +3 x
A. Logic
Distribution of X
0.4
0.3
0.2
Mean,Std.
dev.
 , x
Area = 1 - a
0.1
Area = a/2
0
 za
Area = a/2
2

za
2
Confidence Interval for  ( known)
(when the Central Limit Theorem
applies)
A (1 - a)100% confidence interval for  is
given by
 n =


 x  z  n , x + z  n
x  za ( X ) = x  za
2
a
2

2
a
2
density
Student’s t Distributions
(forStudent's
1 and 30t degrees
of freedom)
Distribution
0.4
0.3
Deg. of fre
11
3030
0.2
0.1
0
-6
-4
-4
-2
0
2
44
66
The Distribution of X when  is unknown
If X is normally distributed with mean  then the
Studentized Random Variable
X 
T
S
n
has a t Distribution with n - 1 degrees of freedom.
Student's t Distribution
0.4
df =
5
density
0.3
0.2
Area = 1 - a
0.1
Area = a/2
Area = a/2
0
-4
-3
-2
 ta
-1
2
0
x
1
2
ta
2
3
4
Confidence Interval for   unknown)
(when X is normal or n > 30)
A (1 - a)100% confidence interval for  is
given by
x  ta
2
 
s
n
Example
The general manager of a fleet of taxis
surveys taxi drivers to determine the
number of miles traveled by a total of 41
randomly selected customers.
If x = 7.7 miles and s = 2.93 miles, estimate
the mean distance traveled with 95%
confidence.
Solution
(1 - a)100% = 95%, therefore, 1 - a = 0.95, so
a = 0.05 (and a/2 = 0.025)
Since n = 41, we have n - 1 = 40 degrees of
freedom.
.
The critical value is ta , n  1 t0.025 , 40 2021
, so
2
a 95% CI for the mean distance traveled is
293
.
given by 770
.  2021
.
 770
.  092
.
 41
or (6.78, 8.62)
Hypothesis Tests for  ( Known)
Assumptions:
• X has mean 
• X is normally distributed OR the sample is
large, i.e., n > 30
Hypothesis Testing: Tests for the Population Mean 
Assumptions: X is normal or n > 30,  is known
Steps:
1. Identify the Hypotheses (the competing claims).
 Null Hypothesis, HO - often the claim of no
difference or no change. (Includes =)
(Note: We always test HO. It is the defendant in
our trial.)
 Alternative Hypothesis, HA - The competing
claim. (Note: We will identify tests as left-tailed,
right-tailed, or two-tailed based upon HA.)
2. Select a, the “significance level of the test,”
based upon the consequence of making the error
of incorrectly rejecting HO when in fact it’s True.
3. Draw a picture that sums up the test.
4. Divide the picture into regions, rejection (or
“critical”) vs. acceptance and use a table or Excel to
find the z value(s) separating the regions. (These are
the critical values.)
5. Take an SRS and calculate the Test Statistic,
x
z
.

n
6. Reject HO if z lies in the critical region; otherwise
accept (or “fail to reject”) HO.
Hypothesis Testing: Tests for the Population Mean

Assumption: X is normal or n > 30
Steps:
1. Identify the Hypotheses (the competing claims).
 Null Hypothesis, HO - often the claim of no
difference or no change. (Includes =)
(Note: We always test HO. It is the defendant in
our trial.)
 Alternative Hypothesis, HA - The competing
claim. (Note: We will identify tests as lefttailed, right-tailed, or two-tailed based upon
HA.)
2. Select a, the “significance level of the test,”
based upon the consequence of making the error
of incorrectly rejecting HO when in fact it’s True.
3. Draw a picture which sums up the test.
4. Divide the picture into regions, rejection (or
“critical”) vs. acceptance and use a table or Excel to
find the t value(s) separating the regions. (These are
the critical values.)
5. Take an SRS and calculate the Test Statistic,
x
t
s
n
6. Reject HO if t lies in the critical region; otherwise
accept (or “fail to reject”) HO.
Example
You own a factory producing sulfuric acid.
The current output = 8,200 liters/hour,
normally distributed. To test a new process, 16
hours of output are obtained with the following
,
.
results: x  8110
and s  2705
Can we conclude that the new process is less
efficient than the current process?
P - Values (Probability Values)
Definition - The p-value is the smallest
significance level at which you would reject
Ho. (the p-value represents a tail probability.)
Using p-values in Hypothesis Tests:
• If p-value < a, then Reject Ho
• If p-value > a, then accept (fail to reject) Ho
We reject Ho for small p-values!
Download