Sunteți pe pagina 1din 89

5-1

Chapter 5
Theory & Problems of
Probability & Statistics
Murray R. Spiegel

Sampling Theory
5-2
Outline Chapter 5
Population X
mean and variance - , o
2

Sample
mean and variance X, ^s
2

Sample Statistics
X mean and variance
^s
2
mean and variance

x
,o
x

s
2
,o
s
2
2
5-3
Outline Chapter 5
Distributions
Population
Samples Statistics
Mean
Proportions
Differences and Sums
Variances
Ratios of Variances
5-4
Outline Chapter 5
Other ways to organize samples
Frequency Distributions
Relative Frequency Distributions

Computation Statistics for Grouped Data
mean
variance
standard deviation

5-5

Population Parameters

A population - random variable X
probability distribution (function) f(x)
probability function
- discrete variable f(x)
density function
- continuous variable
f(x) function of several parameters, i.e.:
mean: ,
variance: o
2
want to know parameters for each f(x)
5-6
Example of a Population













5 project engineers in department
total experience of (X) 2, 3, 6, 8, 11 years
company performing statistical report
employees expertise based on experience
survey must include:
average experience
variance
standard deviation
5-7
Mean of Population













average experience mean:
years 6
5
30
5
11 8 6 3 2
= =
+ + + +
=
5-8
Variance of Population













variance:
n
) x (
2
i
2


= o
5
) 6 11 ( ) 6 8 ( ) 6 6 ( ) 6 3 ( ) 6 2 (
2 2 2 2 2
2
+ + + +
= o
8 . 10
5
25 4 0 9 16
2
=
+ + + +
= o
5-9
Standard Deviation of Population













standard deviation:
o o = =
2
. .d s
o = = 8 . 10 . .d s
29 . 3 8 . 10 = = o
5-10

Sample Statistics

What if dont have whole population
Take random samples from population
estimate population parameters
make inferences
lets see how
How much experience in company
hire for feasibility study
performance study

5-11
Sampling Example













manager assigns engineers at random
each time chooses first engineer she sees
same engineer could do both
lets say she picks (2,2)
mean of sample X= (2+2)/2 = 2
you want to make inferences about true
5-12
Samples of 2













replacement she will go to project department twice
pick engineer randomly
potentially 25 possible teams
25 samples of size two
5 * 5 = 25
order matters (6, 11) is different from (11, 6)

5-13
Population of Samples













All possible combinations are:
(2,2) (2,3) (2,6) (2,8) (2,11)
(3,2) (3,3) (3,6) (3,8) (3,11)
(6,2) (6,3) (6,6) (6,8) (6,11)
(8,2) (8,3) (8,6) (8,8) (8,11)
(11,2) (11,3) (11,6) (11,8) (11,11)
5-14
Population of Averages













Average experience or sample means are: X
i

(2) (2.5) (3) (5) (6.5)
(2.5) (3) (4.5) (5.5) (7)
(3) (4.5) (6) (7) (8.5)
(5) (5.5) (7) (8) (9.5)
(6.5) (7) (8.5) (9.5) (11)
5-15
Mean of Population Means













And mean of sampling distribution of means is :



This confirms theorem that states:


6
25
150
25
(11) ... (5) (3) (2.5) (2)
X
= =
+ + + + +
=
6 ) X ( E
X
= = =
5-16
Variance of Sample Means













variance of sampling distribution of means (X
i
-X)
2

(2-6)
2
(2.5-6)
2
(3-6)
2
(5-6)
2
(6.5-6)
2
(2.5-6)
2
(3-6)
2
(4.5-6)
2
(5.5-6)
2
(7-6)
2

(3-6 ) (4.5-6)
2
(6-6)
2
(7-6)
2
(8.5-6)
2

(5-6 )
2
(5.5-6)
2
(7-6)
2
(8-6)
2
(9.5-6)
2

(6.5-6 )
2
(7-6)
2
(8.5-6)
2
(9.5-6 )
2
(11-6)
2


5-17
Variance of Sample Means













Calculating values:

16

12.25 9 1

0.25
12.25

9 2.25 0.25 1
9 2.25

0 1 6.25
1 0.25 1 4 12.25
0.25 1 6.25 12.25 25
5-18
Variance of Sample Means














variance is:

Therefore standard deviation is


4 . 5
25
135
n
) X X (
2
i
2
X
= =

= o

32 . 2 4 . 5
X
= = o
5-19
Variance of Sample Means













These results hold for theorem:


Where n is size of samples. Then we see that:


n
2
2
X
o
= o
40 . 5
2
8 . 10
n
2
2
X
= =
o
= o
5-20
Math Proof
X mean
X = X
1
+ X
2
+ X
3
+ . . . X
n

n
E(X) = E(X
1
) + E(X
2
)+ E(X
3
) + . . . E(X
n
)


n
E(X) = + + + . . .


n
E(X) =
5-21
Math Proof
X variance
X = X
1
+ X
2
+ X
3
+ . . . X
n

n
Var(X) = o
2
x
= o
2
x
+ o
2
x
+ o
2
x
+ . . . o
2
x

n
2

=

5-22
Sampling Means No Replacement













manager picks two engineers at same time
order doesn't matter
order (6, 11) is same as order (11, 6)
10 choose 2 5!/(2!)(5-2)! = 10
10 possible teams, or 10 samples of size two.


5-23
Sampling Means No Replacement













All possible combinations are:
(2,3) (2,6) (2,8) (2,11) (3,6)
(3,8) (3,11) (6,8) (6,11) (8,11)
corresponding sample means are:
(2.5) (3) (5) (6.5) (4.5)
(5.5) (7) (7) (8.5) (9.5)
mean of corresponding sample of means is:
6
10
5 . 9 ... 5 3 5 . 2
X
=
+ + + +
=
5-24
Sampling Variance No Replacement













variance of sampling distribution of means is:


standard deviation is:

05 . 4
10
) 6 5 . 9 ( ... ) 6 4 ( ) 6 5 . 2 (
n
) X X (
2 2 2 2
i
2
X
=
+ + +
=

= o

01 . 2 05 . 4
n
) X X (
2
i
2
X X
= =

= o = o

5-25
Theorems on Sampling
Distributions with No Replacements













1.


2.

05 . 4
4
3
2
8 . 10
1 5
2 5
2
8 . 10
1 N
n N
n
2
2
X
=
|
.
|

\
|
=
|
.
|

\
|

=
|
.
|

\
|

o
= o
6
X
= =
5-26

Sum Up Theorems on
Sampling Distributions

Theorem I:
Expected values sample mean = population mean
E(X ) =
x
=
: mean of population
Theorem II:
infinite population or sampling with replacement
variance of sample is
E[(X- )
2
] = o
x
2
= o
2
/n

o
2
: variance of population

5-27
Theorems on Sampling
Distributions
Theorem III: population size is N
sampling with no replacement
sample size is n
then sample variance is:





|
.
|

\
|

o
= o
1 N
n N
n
2
2
x
5-28
Theorems on Sampling
Distributions
Theorem IV: population normally distributed
mean , variance o
2
then sample mean normally distributed
mean , variance o
2
/n


) 1 , 0 ( N
n
X
Z ~
o

=
5-29

Theorems on Sampling
Distributions

Theorem V:
samples are taken from distribution
mean , variance o
2

(not necessarily normal distributed)
standardized variables




asymptotically normal
n
X
Z
o

=
5-30

Sampling Distribution of
Proportions

Population properties:
* Infinite
* Binomially Distributed
( p success; q=1-p fail)
Consider all possible samples of size n
statistic for each sample
= proportion P of success
5-31
Sampling Distribution
of Proportions
Sampling distribution of proportions of:
mean:

std. deviation:







p
P
=
n
) p 1 ( p
n
pq
P

= = o
5-32
Sampling Distribution of
Proportions
large values of n (n>30)
sample distribution for P
approximates normal distribution
finite population sample without replacing
standardized P is







n
pq
p P
Z

=
5-33
Example Proportions













Oil service company
explores for oil
according to geological department
37% chances of finding oil
drill 150 wells
P(0.4<P<0.6)=?
5-34
Example Proportions













n
pq
p P
Z

=
P(0.4<P<0.6)=?
P(0.4-0.37 < P-.37 < 0.6-0.37) =?
(.37*.63/150)
.5
(pq/n
).5
(.37*.63/150)
.5
5-35
Example Proportions
P(0.4<P<0.6)=P(0.24<Z<1.84)
=normsdist(1.84)-normsdist(0.24)= 0.372

Think about mean, variance and distribution of
np the number of successes


5-36
Sampling Distribution of
Sums & Differences
Suppose we have two populations.
Population X
A
X
B
Sample of size n
A
n
B

Compute statistic S
A
S
B
Samples are independent
Sampling distribution for S
A
and S
B
gives
mean:
SA

SB
variance: o
SA
2
o
SB
2


5-37

Sampling Distribution of Sums
and Differences

combination of 2 samples from 2 populations
sampling distribution of differences
S = S
A
+/- S
B
For new sampling distribution we have:

mean:
S
=
SA
+/-
SB


variance: o
S
2
= o
SA
2
+ o
SB
2



5-38
Sampling Distribution of
Sums and Differences
two populations X
A
and X
B

S
A
= X
A
and S
B
= X
B
sample means

mean:
XA+XB
=
XA
+
XB
=
A
+
B


variance:


Sampling from infinite population
Sampling with replacement
B
2
B
A
2
A
B X
2
A X
n n
o
+
o
= o
+
5-39
Example Sampling Distribution
of Sums













You are leasing oil fields from
two companies for two years
lease expires at end of each year
randomly assigned a new lease for next year
Company A - two oil fields
production X
A
: 300, 700 million barrels
Company B two oil fields
production X
B
: 500, 1100 million barrels
5-40
Population Means













Average oil field size of company A:


Average oil field size of company B:

500
2
700 300
XA
=
+
=
800
2
1100 500
XB
=
+
=
1300 800 500
XB XA
= + = +
5-41
Population Variances













Company A - two oil fields
production X
A
: 300, 700 million barrels
Company B two oil fields
production X
B
: 500, 1100 million barrels
o
XA
2
= (300 500)
2
+ (700 500)
2
/2 = 40,000
o
XB
2
= (500 800)2 + (1100 800)
2
/2 = 90,000




5-42
Example Sampling Distribution
of Sums













Interested in total production: X
A
+ X
B

Compute all possible leases assignments
Two choices X
A
, Two choices X
B

X
Ai
X
Bi
{300, 500}
{300, 1100}
{700, 500}
{700, 1100}
5-43
Example Sampling Distribution
of Sums













X
Ai
X
Bi
{300, 500}
{300, 1100}
{700, 500}
{700, 1100}
Then for each of the 4 possibilities
4 choices year 1, four choices year 2 = 4*4 samples
5-44
Example Sampling Distribution
of Sums













Samples X
Ai
X
Bi
X
Ai
X
Bi
Year 1 300 500 300 1100
Year 2 300 500 300 500
Year 1 300 500 300 1100
Year 2 300 1100 300 1100
Year 1 300 500 300 1100
Year 2 700 500 700 500
Year 1 300 500 300 1100
Year 2 700 1100 700 1100
5-45
Example Sampling Distribution
of Sums













Samples X
Ai
X
Bi
X
Ai
X
Bi
Year 1 700 500 700 1100
Year 2 300 500 300 500
Year 1 700 500 700 1100
Year 2 300 1100 300 1100
Year 1 700 500 700 1100
Year 2 700 500 700 500
Year 1 700 500 700 1100
Year 2 700 1100 700 1100
5-46
Compute Sum and Means of each
sample
Means X
Ai
+X
Bi
Mean X
Ai
+X
Bi
Mean
Year 1 800 800 1400 1100
Year 2 800 800
Year 1 800 1100 1400 1400
Year 2 1400 1400
Year 1 800 1000 1400 1300
Year 2 1200 1200
Year 1 800 1300 1400 1600
Year 2 1800 1800
5-47
Compute Sum and Means of each
Sample
Means X
Ai
+X
Bi
Mean

X
Ai
+X
Bi
Mean
Year 1 1200 1000 1800 1300
Year 2 800 800
Year 1 1200 1300 1800 1600
Year 2 1400 1400
Year 1 1200 1200 1800 1500
Year 2 1200 1200
Year 1 1200 1500 1800 1800
Year 2 1800 1800
5-48
Mean of Sum of Sample Means
Population of Samples
{800, 1100, 1000, 1300, 1100, 1400, 1300, 1600, 1000, 1300,
1200, 1500, 1300, 1600, 1500, 1800}
_______
X
Ai
+X
Bi
=

(800 + 1100 + 1000 + 1300 + 1100 + 1400 + 1300 + 1600 +
1000 + 1300 + 1200 + 1500 + 1300 + 1600 + 1500 + 1800)
16
= 1300
5-49
Mean of Sum of Sample Means
This illustrates theorem on means
_____

(XA+XB)
= 1300=
XA
+

XB
= 500 + 800 = 1300

_____
What about variances of X
A
+X
B
5-50
Variance of Sum of Means



Population of samples
{800, 1100, 1000, 1300, 1100, 1400, 1300, 1600, 1000, 1300,
1200, 1500, 1300, 1600, 1500, 1800}

o
2
= {(800 - 1300)
2
+ (1100 - 1300)
2
+ (1000 - 1300)
2
+
(1300 - 1300)
2
+ (1100 - 1300)
2
+ (1400 - 1300)
2
+ (1300-
1300)
2
+ (1600 - 1300)
2
+ (1000 - 1300)
2
+ (1300 - 1300)
2
+
(1200 - 1300)
2
+ (1500 - 1300)
2
+ (1300 - 1300)
2
+ (1600 -
1300)
2
+ (1500 - 1300)
2
+ (1800 - 1300)
2
}/16
= 65,000
5-51
Variance of Sum of Means
B
2
B
A
2
A
B X
2
A X
n n
+
2
000 , 90
2
40000
000 , 65
This illustrates theorem on variances
5-52
Normalize to Make Inferences on
Means
B
2
B
a
2
A
B A B A
n n
X X
o
+
o
+
5-53
Estimators for Variance
n
) X X ( ... ) X X ( ) X X (
S
2
n
2
2
2
1
2
+ + +
=
2 2
)

( o = S E
1 n
) X X ( ... ) X X ( ) X X (
S

2
n
2
2
2
1
2

+ + +
=
use for populations
unbiased better for smaller samples
Two choices
5-54
Sampling Distribution of Variances
All possible random samples of size n
each sample has a variance
all possible variances
give sampling distribution of variances

sampling distribution of related random variable



2
2
n
2
2
2
1
2
2
2
2
) X X ( ... ) X X ( ) X X ( S

) 1 n ( nS
o
+ + +
=
o

=
o
5-55
Example Population of Samples













All possible teams are:
(2,2) (2,3) (2,6) (2,8) (2,11)
(3,2) (3,3) (3,6) (3,8) (3,11)
(6,2) (6,3) (6,6) (6,8) (6,11)
(8,2) (8,3) (8,6) (8,8) (8,11)
(11,2) (11,3) (11,6) (11,8) (11,11)
5-56
Compute Variance for Each Sample













sample variance corresponding to each of 25 possible
choice that manager makes are: ^s
2

0 0.25 4 9 20.25
.25 0 2.25 6.25 16
4 2.25 0 1 6.25
9 6.25 1 0 2.25
20.25 16 6.25 2.25 0


25 . 20
2
) 5 . 6 11 ( ) 5 . 6 2 (
2 2
=
+
5-57
Sampling Distribution of Variance













Population of Variances
mean
variance
distribution
(n-1)s
2
/o
2
~ _
2
n-1

5-58
What if Unknown Population
Variance?


X is Normal (, o
2
)
to make inference on means we normalize
n
X
Z
o

=
5-59
Unknown Population Variance


2
2
2
S

) 1 n (
o

= _
1 n
2
2
t
n
S

X
S

) 1 n (
n
X

=

=
o

o

5-60
Unknown Population Variance


) t
n
S

X
t ( P
2 c , 1 n 1 c , 1 n
=

s
Use in the same way as for normal
except use different Tables
= 0.05
05 . 0 1 ) 0639 . 2
n
S

X
0639 . 2 ( P = =

s
n = 25, =tinv(0.05,24)= 2.0639
2.06 -2.06
5-61
Uses t -statistics
Will use for testing
means, sums, and differences of means
small samples when variable is normal
substitute sample variance in for true
n
s
X
t
n
X
Z
1 n

=
o

=

5-62
Uses t -statistics
sums and differences of means


) 1 , 0 ( N
n n
) ( X X
2 1
2
2
2
1
2 1 2 1
=
+
o + o

unknown variance
( ) ( )
2 n n
2 1
2 1
2 1
2
2 2
2
1 1
2 1 2 1
2 1
t
n n
n n
2 - n n
s 1 - n s 1 - n
) ( X X
+
=
|
.
|

\
|

+
+
+

5-63
Uses _
2
statistic

2
2
2
S

) 1 n (
o

= _
Inference on Variance
Large sample test
5-64
Inferences o
2
2
/o
1
2









F Statistic
) 1 n (
s ) 1 n (
) 1 n (
s ) 1 n (
2
2
2
2
2 2
1
2
1
2
1 1

_2
df1
/df1 =
_2
df2
/df2
2 df , 1 df
2
1
2
2
2
2
2
1
F
s
s
~
o
o
5-65
F Statistic
Other tests
groups of coefficients
5-66
Other Statistics
. Medians .



n > 30, sample distribution of medians
nearly normal if X is normal
n
2533 . 1
n 2
med
o
=
t
o = o
=
med
5-67
Frequency Distributions
If sample or population is large
difficult to compute statistics
(i.e. mean, variance, etc)
Organizing RAW DATA is useful
arrange into CLASSES or categories
determine number in each class
Class Frequency or Frequency Distribution

5-68
Frequency Distributions - Example
Example of Frequency Distribution:
middle size oil company
portfolio of 100 small oil reservoirs
reserves vary from 89 to 300 million barrels
5-69
Frequency Distributions - Example
arrange data into categories
create table showing ranges of reservoirs sizes
number of reservoirs in each range
Reserves
Number of
Fields
50-100 4
101-150 21
151-200 42
201-250 27
251-300 6
TOTAL 100
5-70
Frequency Distributions - Example
Class intervals are in ranges of 50 million barrels
Each class interval represented by median value
e.g. 200 up to 250 will be represented by 225
Can plot data
histogram
polygon
This plot is represents frequency distribution

5-71
Frequency Distributions Plotted -
Example
Reserves
Number of
Fields
50-100 4
101-150 21
151-200 42
201-250 27
251-300 6
TOTAL 100
0
5
10
15
20
25
30
35
40
45
25 75 125 175 225 275 325
Reserves (mmb)
N
o
.

o
f

F
i
e
l
d
s
5-72
Relative Frequency Distributions
and Ogives
number of individuals
- frequency distribution
- empirical probability distribution
percentage of individual
- relative frequency distribution
empirical cumulative probability distribution
- ogive

5-73
0
10
20
30
40
50
60
70
80
90
100
25 75 125 175 225 275 325
Reserves (mmb)
C
u
m
u
l
a
t
i
v
e

F
r
e
q
u
e
n
c
y

D
i
s
t
r
i
b
u
t
i
o
n
Percent Ogives
OGIVE for oil company portfolio of reservoirs








Shows percent reservoirs < than x reserves
5-74
Computation of Statistics for
Grouped Data
can calculate mean and variance
from grouped data








outcome frquency
X1 f1
X2 f2
X3 f3

Xk fk
TOTAL n
5-75
Computation of Statistics for
Grouped Data
take 420 samples of an ore body
measure % concentration of Zinc (Zn)
frequency distribution of lab results








5-76
Computation of Statistics for
Grouped Data








% Weight Frequency % Weight Frequency
1.00 2 1.55 28
1.05 5 1.60 14
1.10 11 1.65 22
1.15 21 1.70 18
1.20 33 1.75 15
1.25 41 1.80 4
1.30 53 1.85 2
1.35 42 1.90 2
1.40 38 1.95 3
1.45 31 2.00 1
1.50 34 TOTAL 420
5-77
Computation of Statistics
for Grouped Data
mean will then be:





And in our example:









n
x f ... x f x f
n
x f
x
k k 2 2 1 1
i i
+ + +
= =
+ + + = =
k 2 1 i
f ... f f f n
40 . 1
420
1 * 00 . 2 ... 31 * 45 . 1 ... 5 * 05 . 1 2 * 00 . 1
n
x f
x
i i
=
+ + + + +
= =
5-78
Computation of Statistics for
Grouped Data
variance will then be:











n
) x x ( f ... ) x x ( f ) x x ( f
n
) x x ( f
S
2
k k
2
2 2
2
1 1
2
i i
2
+ + +
=

=

5-79
Computation of Statistics for
Grouped Data
And in our example:








0365 . 0 S
420
) 40 . 1 00 . 2 ( 1 .... ) 40 . 1 05 . 1 ( 5 ) 40 . 1 00 . 1 ( 2
S
n
) x x ( f
S
2
2 2 2
2
2
i i 2
=
+ + +
=
=

=

5-80
Computation of Statistics
for Grouped Data
Similar formula are available for higher moments:






















































n
) x x ( f ... ) x x ( f ) x x ( f
n
) x x ( f
m
r
k k
r
2 2
r
1 1
r
i i
r
+ + +
=

=
n
x f ... x f x f
n
x f
m
r
k k
r
2 2
r
1 1
r
i i
r
+ + +
= =
'
5-81
Sum up Chapter 5
Population X
mean and variance - ,
2

distribution
A Sample
statistic from sample
usually mean and variance X, ^s
2

5-82
Sum up Chapter 5
Sample Statistics
X mean and variance
x
,

o
x
2

^s
2
mean and variance

^s
2
,

o
^s
2

Distribution
5-83
Sum Up Chapter 5
Samples Statistics
Mean X ~ ,
2
/n
Distribution



n
s
X
t
n
X
Z
1 n

=
o

=

5-84
Sum Up Chapter 5
Samples Statistics
Proportions P ~ p, p(1-p)/n
n>30
Distribution

n
pq
p P
Z

=
5-85
Sum Up Chapter 5
Samples Statistics
Differences and Sums
X
1
+/- X
2
~
1
+
2
, o
1
2
/n
1
+ o
2
2
/n
2

Distribution


) 1 , 0 ( N
n n
) ( X X
2 1
2
2
2
1
2 1 2 1
=
+
o + o

( ) ( )
2 n n
2 1
2 1
2 1
2
2 2
2
1 1
2 1 2 1
2 1
t
n n
n n
2 - n n
s 1 - n s 1 - n
) ( X X
+
=
|
.
|

\
|

+
+
+

5-86
Sum Up Chapter 5
Samples Statistics
Variances
Distribution




Mean = n-1
Variance = 2(n-1)
2
2
2
1 n
S

) 1 n (
o

= _

5-87
Sum Up Chapter 5
Samples Statistics
Ratios of Variances
2 df , 1 df
2
1
2
2
2
2
2
1
F
s
s
~
o
o
5-88
Sum up Chapter 5
Other ways to organize samples
Frequency Distributions
Relative Frequency Distributions

Computation Statistics for Grouped Data
mean
variance
standard deviation

5-89
THATS ALL FOR
CHAPTER 5
THANK YOU!!

S-ar putea să vă placă și