Download as pdf or txt
Download as pdf or txt
You are on page 1of 29

Lsw 2011/04/13 rev

Contact: lsw@9.cn

X ~ B(n, p)
prob. density : f ( x)  Cxn p x (1  p)n  x

C35  0.53  0.52

0.5  0.5  0.5  0.5  0.5


C xn C35

HT 1
Lsw 2011/04/13 rev
Contact: lsw@9.cn

C35  C25

Cnn x p x (1  p)n x

Suppose we have k possible outcome in a test , having prob. of p1 , p2 , , pk


then the prob. of having ni as the i  th outcome is given by :
( Notice that  ni  N )
N!
 p1n1  p2 n2  p3n3  pk nk
n1 !n2 !n3 ! nk !

Concern the prob to have n1 for p1 ; n2 for p2 ; n3 for p3


First , prob. to have n1 for p1 , and ( N  n1 ) for non  p1 is given as :
P(n1 for p1 , rest are not p1 )  CnN1  p1n1  ( p2  p3 ) n2  n3
For each of non  p1 , we have
P(n2 for p2 , n3 for p3 | the outcome is not p1 )  CnN2  n1  p2 n2  p3n3
P(n1 for p1 , n2 for p2 , n3 for p3 )  CnN1  p1n1  P ( In the N  n1 trials , n2 for p2 and n3 for p3 )
 CnN1  p1n1  CnN2  n1  p2 n2  p3n3
N !  ( N  n1 )!
  p1n1  p2 n2  p3n3
n1 !( N  n1 )!n2 !( N  n1  n2 )!
N!
  p1n1  p2 n2  p3n3
n1 !n2 !n3 !

HT 2
Lsw 2011/04/13 rev
Contact: lsw@9.cn

The population is of size N which consists of m desirable outcome,


the prob. to have x desirable outcome of size n is
CxmCnNxm
P( X  x) 
CnN

m
P( Hypergeometric : X  x)  Cxn  p x  (1  p)n  x for large N , p 
N

15000
C10

X ~ B(n, p)

E ( X )  np
Var ( X )  np(1  p)

See that E ( X )  E ( X 1 )  E ( X 2 )    E ( X n )  np
n
Var ( X )  Var ( X i )   (12  p  p 2 )  np(1  p)
i 1

X , Y as indp. trials, E( X  Y )  E( X )  E(Y ); Var ( X  Y )  Var ( X )  Var (Y )

Var (nX )  n2Var ( X )


Var ( X  Y )  Var ( X )  Var (Y )

HT 3
Lsw 2011/04/13 rev
Contact: lsw@9.cn

P( X  1) P( X )
 1 and 1
P( X ) P( X  1)

P( X  1) C XN1 p x 1 (1  p) N  x 1 (n  x)
 N x
 p
P( X ) C X p (1  p)
N x
( x  1)(1  p)

req. prob  P(having 2 students overweight in first 9 students)  P(the last is overweight )
 C29  p 2  (1  p)7  p

P( X  x)  Ckx11  p k (1  p) xk k being the number of success need to observe

HT 4
Lsw 2011/04/13 rev
Contact: lsw@9.cn

P( At least X trials is needed )


 P(0 in X  1 trials)  P(1 in X  1 trials)    P(k  1 in X  1 trials )
 C0x 1 (1  p) x 1  C1x 1 (1  p) x  2  p    Ckx11 (1  p) x  k  p k 1
OR
 1  [ P(not more than X )]

 x e 
P( X  x) 
x!

  np

 x e 
Cxn p x (1  p) x 
x!

Obviously, the required combination  C1n  C2n  C3n    Cnn

HT 5
Lsw 2011/04/13 rev
Contact: lsw@9.cn

(1  x) n  1  C1n x  C2n x 2    Cnn x n


Put x  1, C1n  C2n    Cnn  2n  1
Thus, the required sum is 2n  1

One could treat the two books as one book and reckon the total number  8! 2!

9!
Ways  (Ways  3!  9!, that is, if we care their ordering again, we should multiply 3! to get 9!)
3!

9!
Ways 
6! 3!

C2n1  n(n  1)!


Required prob. 
nn1

HT 6
Lsw 2011/04/13 rev
Contact: lsw@9.cn

(n  1) n ! n
 Cnn 1 n (n  1)!
2

n n 1

n  n  n  n  n  nn1

1  k  n 1

1 1
Ckn 1 ( )n 1  C0n ( )n
2 2
1 1
Ckn11 ( )n 1  C1n ( )n
2 2
1 1
Ckn21 ( )n 1  C2n ( )n
2 2
1 1
Ckn31 ( )n 1  C3n ( )n
2 2

n 1 k
1
req. prob.  C
i 0
n 1
Cin ( )2 n 1
k i
2

(1  x)m n 1 n n C2n mk

x n
 (1  x ) m
(1 
x
)  (1  mx  C2
m 2
x  )(1  
x x 2
 )  
r 0
Ckm r Crn  Cnmkn

Cn2nk1
req. prob 
22 n1

HT 7
Lsw 2011/04/13 rev
Contact: lsw@9.cn

0.5, x  0
P( X  x)  f ( x)   (discrete)
 0.5, x  1

 0, else
 x,0  x  1
f ( x)  
1 ,1  x  2
 2

1.5
P(0.5  X  1.5)   f ( x) dx
0.5
1 1.5 1
  x dx   dx  0.625
0.5 1 2

P(0.5  X  1.5)  P( X  0.5)  P(0.5  X  1.5)  P( X  1.5)

HT 8
Lsw 2011/04/13 rev
Contact: lsw@9.cn



f ( x) dx  1

F ( x)  P( X  x) ( for both discrete, continuous)


x
 f (t ) dt ( for continuous)


 lim F ( x)  1
x 

 lim F ( x)  0
x 

 F is continuous

 0, else
 x,0  x  1
f ( x)  
1 ,1  x  2
 2

 0, else
y
 ,0  y  2
Wrong approach : f ( y )   2 , where f ( y ) is the pdf for Y  2 X
1
 ,2  y  4
2

HT 9
Lsw 2011/04/13 rev
Contact: lsw@9.cn

 all y
f ( y)  2  1

b y (b ) dx
a
f ( x) dx  
y(a)
f ( x( y )) 
dy
 dy

b
P(a  x  b)   f ( x) dx
a
y (b ) dx
 f ( x( y )) 
 dy
y(a) dy
 P( y (a)  y  y (b))

dx
f ( x( y )) 
dy

 0, else
 x, 0  x  1 y dx 1
pdf of X : f ( x)   ; for y  2 x, x( y )  and 
 ,1 x  2
1 2 dy 2
 2
 0, else
y 1
  ,0 y2
 pdf of Y : f ( y )   2 2
1 1
  ,2 y4
2 2

HT 10
Lsw 2011/04/13 rev
Contact: lsw@9.cn

 0, x <0
 0, else  2
 x, 0  x  1  x ,0  x  1

Since pdf of X : f ( x)    P( X  x)  F ( x)   2
1 , 1  x  2  x ,1  x  2
 2 2
 1, x  2

 0, y  0
 2  0, else
 y ,0  y  2 y
y   ,0  y  2
Y  2 X : cdf of Y : F ( y )  P (Y  y )  P ( X  )   8 And so f ( y )   4
2  y ,2  y  4 1
4  ,2 y4
 1, y  4 4

f ( x)  3 x 2  5 x  f ( y )  3 y 2  5 y

f ( x)  P( X  x)

dF ( x)
 f ( x)
dx

HT 11
Lsw 2011/04/13 rev
Contact: lsw@9.cn

( x   )2
1 
If f ( x)  e 2 2
for all x, we say X ~ N (  ,  2 )
 2

E ( X )  ; Var ( X )   2


P( X  m)   f ( x) dx   1;   0
m

X ~ N (,  2 ) X ~ N (0,1)

P( X  13.6 | X ~ N (10,12.3))
13.6  10
 P( Z  )  
12.3

HT 12
Lsw 2011/04/13 rev
Contact: lsw@9.cn

z  1.8814
45  1.8814 13.7  70.8

X ~ N (3.14, 0.02) and Y ~ N (6.28, 0.08)


then 2Y  X ~ N (0, 0.34)

Var ( X  Y )  Var ( X )  Var (Y ) Var (kX )  k 2 Var ( X )

Denote X i as i  th paper.
X1  X 2    X 10 ~ N (450,1876.9)

and standard score required  1.8814


ie, acutal score  450  1.8814  1876.9  531.5

HT 13
Lsw 2011/04/13 rev
Contact: lsw@9.cn

n
n !  2 n ( )n
e
x2 n 1
x  1: ln(1  x)  x   where y  x  np
2 (n(1  p)  y)(np  y) 

( x   )2
1 
n x
C p (1  p)
n x
 e 2 2

2
x

X ~ B(n, p) follows N (np, np(1  p)) approximately for large n

Cxn p x (1  p)n x

P( X  58)


58
f ( x) dx

P( X  58)

HT 14
Lsw 2011/04/13 rev
Contact: lsw@9.cn

Denote X as number she got and hence her marks


X ~ B(100, 0.25)
X ~ N (25,18.75) approximately.
40  25  0.5
P( X  40)  P( Z  )  4.1104
18.75

Say she answered n questions.


Let M be her marks and X as correct answers
M  X  (n  X )  2 X  n
X ~ B(n, 0.5)
E ( X )  2  n  0.5  n  0

no. of success
proportion of success 
no. of expts

p(1  p)
ps ~ N ( p, ) ps np  10
n

no. of success  2
p' 
no. of success  4

HT 15
Lsw 2011/04/13 rev
Contact: lsw@9.cn

0.5
n

0.03  0.97
See that ps ~ N (0.03, )
500
0.5
0.04   0.03
a ) P( ps  0.04)  P( Z  500 )  0.88095
0.03  0.97
500
0.5
0.05  0.03 
b) P( ps  0.05)  P( Z  500 )  6.38 103
0.03  0.97
500

x  0.5 0.5
 p
n n

X ~ Pois( )  X ~ N (,  ) approximately, for   20

HT 16
Lsw 2011/04/13 rev
Contact: lsw@9.cn

Moment of a continuous function f about a point c is



n '   f ( x)  ( x  c) n dx


Central moment : n  E (( X   )n )

  E( X )

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

Var ( X )  sd  
 ( X   )3
1  E( )
3


median   
6

mode   
2

4
old def :  2 
4
4
current def :  2  3
4

HT 17
Lsw 2011/04/13 rev
Contact: lsw@9.cn

E(U )   , U is an unbiased estimator of 

n
( X i )
define X  i 1
to estimate the population mean 
n
n
now, E ( X )  
n

X GM  n X1 X 2  X n

HT 18
Lsw 2011/04/13 rev
Contact: lsw@9.cn

WLOG, set   1

Let S 2

(X i  X )2
n
For any two x1 and x2 ,
E[( x1  x2 ) 2 ]  Var ( x1  x2 )  [ E ( x1  x2 )]2
 Var ( x1 )  Var ( x2 )  2
Note that  ( xi  x j ) 2   ( xi 2  2 xi x j  x j 2 )
i j i j

 2n xi  2( xi )  2n S
2 2 2 2

i i

1 1
But E ( S 2 )  E{
2n 2
 ( x  x ) }  n
i j
i j
2
2
E[ 
all pairs
( xi  x j ) 2 ]
i j

1 n 1
 2
 2  C2n  1 2
n n

Sˆ 2 
( Xi  X ) 2

n 1
n
sample sd  sd 
n 1

n
n 1

MSE ( )  E[(ˆ   )2 ], ˆ being the estimator for 

X
X i

HT 19
Lsw 2011/04/13 rev
Contact: lsw@9.cn

2
MSE ( X )  E ((   X ) 2 )   2  2  2  E ( X )
1
 Var ( X )  2  (Var ( X 1 )  Var ( X 2 )    Var ( X n ))
n
2

n

Var (a)  E (a 2 )  E (a)2


n
( X j ) 2
2 j 0
E( X )  E( )
n2

X ~ N (,  2 )

X ~ N ( , 2.90172 )

X i
X i
n

HT 20
Lsw 2011/04/13 rev
Contact: lsw@9.cn

X
i
i ~ N (  , n 2 )

2
X ~ N ( , )
n

2
n

P( Lower limit    Upper limit )  95%  0.95


2 2
Now we know P(   1.96  X    1.96 )  0.95
n n
2 2
 P( X  1.96    X  1.96 )  0.95
n n

2 2
[   1.96 ,   1.96 ]
n n
2 2
[ X  1.96 , X  1.96 ]
n n
2 2
  X  1.96  X    1.96
n n


1.96  2.9017 1.96  2.9017
[18.6  ,18.6  ]  [16.7, 20.5]
9 9

 2 1.96 
n

HT 21
Lsw 2011/04/13 rev
Contact: lsw@9.cn


1.96  0.5 102
n

p(1  p) p(1  p)
95% CI :[ p  1.96 , p  1.96 ]
n n

p '(1  p ') p '(1  p ')


95% CI :[ p ' 1.96 , p ' 1.96 ]
N 4 N 4

P( X  k )  P( X  k )

HT 22
Lsw 2011/04/13 rev
Contact: lsw@9.cn

H0

the coin has prob. p to show heads


H 0 : p  0.5
H1 : p  0.5

H 0 : p  0.5
H1 : p  0.5

H 0 : the defendant is not guilty


H1 : the defendant is guilty

HT 23
Lsw 2011/04/13 rev
Contact: lsw@9.cn

P(type I error )  P(reject H 0 | H 0 is true)


P(type I error )  P(consecutively 10 H / T | p  0.5)  ( )10  2  1.953 103
2

P(type II error )  P(accept H 0 | H1 is true)

P(type II error )  P( Not all 5 are heads | p  0.65)  1  0.655  0.8840

HT 24
Lsw 2011/04/13 rev
Contact: lsw@9.cn

X 
z

Denote X as IQ. Known that X ~ N (  , 202 )


H 0 :   100
H1 :   100

H 0 :   100; H1 :   100

HT 25
Lsw 2011/04/13 rev
Contact: lsw@9.cn

202
Under H 0 , X ~ N (100, )
60
From the sample, X  102.6
Under 5% sig. level , reject H 0 if test statistic z  1.645
102.6  100
test statistic z   1.0070  1.645
202
60

H1 :   100

Under 5% sig. level , accept H 0 as we are not evident enough to show they are more intelligent

HT 26
Lsw 2011/04/13 rev
Contact: lsw@9.cn

Denote p by the proportion of male in school


H 0 : p  0.5
H1 : p  0.5
0.5  0.5
Under H 0 , in the ps sample of 500 students , ps ~ N (0.5, )
500
In 5% sig . level , reject H 0 if test statistic z  1.96 or z  1.96
267
From the sample, ps   0.534
500
0.5
0.534   0.5
Test statistic z  500 =1.47<1.96
0.52
500
Do not reject H 0 , ie, we are not evident enough to believe there is an unequal number

Reject H 0 if P( X  267)  0.05

HT 27
Lsw 2011/04/13 rev
Contact: lsw@9.cn

Let X be number of heads obtained


X ~ B(6, p)
H 0 : p  0.5
H1 : p  0.5
under H 0 , X ~ B(6, 0.5)
under 5% sig level , reject H 0 if test statistic x satisfying : P( X  x)  0.05
Now x  5
P( X  5)
 6  0.56  0.56  0.109375  0.05
We are not evident enough to reject H 0 . The coin is not biased .

Reject if P( X  5)  0.05 but not P( X  5)  0.05

Denote X as number of correct attempt for milk  first


1 1
P( X  4)  8
  0.01429
C4 70
C34
P( X  3)   0.05714
C48
See that P( X  4)  0.01429  0.05
P( X  3)  0.07143  0.05
Therefore, the woman must have all correct attempts

HT 28
Lsw 2011/04/13 rev
Contact: lsw@9.cn

P(type I error )  P( Reject as biased | p  0.3)


 P(receive 38 or more heads | p  0.3)
 P( X  38 | X ~ B(100, 0.3))
 P( X  38 | X ~ N (30, 21) approximately )
37.5  30
 P( Z  )
21
 5.085%
P(type II error )
 P(accept as biased | p  0.5)
 P( X  37 | X ~ N (50, 25) approximately )
37.5  50
 P( Z  )
25
 6.21 103
Let his new rule be accept the coin if it shows c heads at most.
c  0.5  30
P( Z  )  0.02
21
c  0.5  50
P( Z  )  0.02
25
on solving ,
38.9  c  39.23
choose c  39

39.5  30
P(type I error )  P( Z  )  1.91%
21
39.5  50
P(type II error )  P( Z  )  1.79%
25

HT 29

You might also like