STAT1306_11-12_T05_Slides

79
TUTORIAL 5 Chapter 4: Continuous R.V. (Part I) & Assignment STAT1306 Introductory Statistics (First Semester, 2011-2012) Jun FU Department of Statistics and Actuarial Science The University of Hong Kong October 10, 2011 Jun FU (S&AS, HKU) STAT1306 Introductory Statistics. October 10, 2011 1 / 37

Transcript of STAT1306_11-12_T05_Slides

Page 1: STAT1306_11-12_T05_Slides

TUTORIAL 5Chapter 4: Continuous R.V. (Part I) & Assignment

STAT1306 Introductory Statistics(First Semester, 2011-2012)

Jun FU

Department of Statistics and Actuarial ScienceThe University of Hong Kong

October 10, 2011

Jun FU (S&AS, HKU) STAT1306 Introductory Statistics. October 10, 2011 1 / 37

Page 2: STAT1306_11-12_T05_Slides

Review of Key Concepts

Game Plan

1 Review of Key Concepts

Basic Definitions

Comparison Between Discrete and Continuous Random Variables

2 Problems

Continuous Random Variables

Some Questions from Assignments

3 Ending

Jun FU (S&AS, HKU) STAT1306 Introductory Statistics. October 10, 2011 2 / 37

Page 3: STAT1306_11-12_T05_Slides

Review of Key Concepts Basic Definitions

Game Plan

1 Review of Key Concepts

Basic Definitions

Comparison Between Discrete and Continuous Random Variables

2 Problems

Continuous Random Variables

Some Questions from Assignments

3 Ending

Jun FU (S&AS, HKU) STAT1306 Introductory Statistics. October 10, 2011 3 / 37

Page 4: STAT1306_11-12_T05_Slides

Review of Key Concepts Basic Definitions

Definitions

Continuous Random Variables: It can take any value in an interval.

Cumulative Distribution Function (c.d.f.):

FY (y) = P(Y ≤ y) = P(Y < y).

Probability Density Function (p.d.f.):

fY (y) =dFY (y)

dy= F

′Y (y), FY (y) =

ˆ y

−∞fY (s)ds.

It has the following properties:

(a) fY (y) ≥ 0 for any value of y .(b)´∞−∞ fY (y)dy = FY (∞) = 1.

Jun FU (S&AS, HKU) STAT1306 Introductory Statistics. October 10, 2011 4 / 37

Page 5: STAT1306_11-12_T05_Slides

Review of Key Concepts Basic Definitions

Definitions

Continuous Random Variables: It can take any value in an interval.

Cumulative Distribution Function (c.d.f.):

FY (y) = P(Y ≤ y) = P(Y < y).

Probability Density Function (p.d.f.):

fY (y) =dFY (y)

dy= F

′Y (y), FY (y) =

ˆ y

−∞fY (s)ds.

It has the following properties:

(a) fY (y) ≥ 0 for any value of y .(b)´∞−∞ fY (y)dy = FY (∞) = 1.

Jun FU (S&AS, HKU) STAT1306 Introductory Statistics. October 10, 2011 4 / 37

Page 6: STAT1306_11-12_T05_Slides

Review of Key Concepts Basic Definitions

Definitions

Continuous Random Variables: It can take any value in an interval.

Cumulative Distribution Function (c.d.f.):

FY (y) = P(Y ≤ y) = P(Y < y).

Probability Density Function (p.d.f.):

fY (y) =dFY (y)

dy= F

′Y (y), FY (y) =

ˆ y

−∞fY (s)ds.

It has the following properties:

(a) fY (y) ≥ 0 for any value of y .(b)´∞−∞ fY (y)dy = FY (∞) = 1.

Jun FU (S&AS, HKU) STAT1306 Introductory Statistics. October 10, 2011 4 / 37

Page 7: STAT1306_11-12_T05_Slides

Review of Key Concepts Basic Definitions

Definitions

Continuous Random Variables: It can take any value in an interval.

Cumulative Distribution Function (c.d.f.):

FY (y) = P(Y ≤ y) = P(Y < y).

Probability Density Function (p.d.f.):

fY (y) =dFY (y)

dy= F

′Y (y), FY (y) =

ˆ y

−∞fY (s)ds.

It has the following properties:

(a) fY (y) ≥ 0 for any value of y .(b)´∞−∞ fY (y)dy = FY (∞) = 1.

Jun FU (S&AS, HKU) STAT1306 Introductory Statistics. October 10, 2011 4 / 37

Page 8: STAT1306_11-12_T05_Slides

Review of Key Concepts Basic Definitions

Definitions

Continuous Random Variables: It can take any value in an interval.

Cumulative Distribution Function (c.d.f.):

FY (y) = P(Y ≤ y) = P(Y < y).

Probability Density Function (p.d.f.):

fY (y) =dFY (y)

dy= F

′Y (y), FY (y) =

ˆ y

−∞fY (s)ds.

It has the following properties:

(a) fY (y) ≥ 0 for any value of y .(b)´∞−∞ fY (y)dy = FY (∞) = 1.

Jun FU (S&AS, HKU) STAT1306 Introductory Statistics. October 10, 2011 4 / 37

Page 9: STAT1306_11-12_T05_Slides

Review of Key Concepts Comparison Between Discrete and Continuous Random Variables

Game Plan

1 Review of Key Concepts

Basic Definitions

Comparison Between Discrete and Continuous Random Variables

2 Problems

Continuous Random Variables

Some Questions from Assignments

3 Ending

Jun FU (S&AS, HKU) STAT1306 Introductory Statistics. October 10, 2011 5 / 37

Page 10: STAT1306_11-12_T05_Slides

Review of Key Concepts Comparison Between Discrete and Continuous Random Variables

Discrete R.V. vs Continuous R.V.

Basic Definition Discrete ContinuousP(Y ∈ A) =

∑y∈A p(y)

´A fY (y)dy

FY (y) = P(Y ≤ y) P(Y ≤ y) = P(Y < y)

E (Y ) =∑

y y · p(y)´∞−∞ y · fY (y)dy

E [g(Y )] =∑

y g(y) · p(y)´∞−∞ g(y) · fY (y)dy

Var(Y ) = E[(Y − µ)2

]=

∑y (y − µ)2 · p(y)

´∞−∞(y − µ)2 · fY (y)dy

MY (t) = E[etY]

=∑

y ety · p(y)

´∞−∞ ety · fY (y)dy

Jun FU (S&AS, HKU) STAT1306 Introductory Statistics. October 10, 2011 6 / 37

Page 11: STAT1306_11-12_T05_Slides

Problems

Game Plan

1 Review of Key Concepts

Basic Definitions

Comparison Between Discrete and Continuous Random Variables

2 Problems

Continuous Random Variables

Some Questions from Assignments

3 Ending

Jun FU (S&AS, HKU) STAT1306 Introductory Statistics. October 10, 2011 7 / 37

Page 12: STAT1306_11-12_T05_Slides

Problems Continuous Random Variables

Game Plan

1 Review of Key Concepts

Basic Definitions

Comparison Between Discrete and Continuous Random Variables

2 Problems

Continuous Random Variables

Some Questions from Assignments

3 Ending

Jun FU (S&AS, HKU) STAT1306 Introductory Statistics. October 10, 2011 8 / 37

Page 13: STAT1306_11-12_T05_Slides

Problems Continuous Random Variables

For a function

f (x) =

{(ρ− 1)x−ρ x ≥ 1

0 x < 1,

where ρ > 1.

(a) Is f (x) a density function? Why?

(b) Find F (x).

Jun FU (S&AS, HKU) STAT1306 Introductory Statistics. October 10, 2011 9 / 37

Page 14: STAT1306_11-12_T05_Slides

Problems Continuous Random Variables

For a function

f (x) =

{(ρ− 1)x−ρ x ≥ 1

0 x < 1,

where ρ > 1.

(a) Is f (x) a density function? Why?

(b) Find F (x).

Jun FU (S&AS, HKU) STAT1306 Introductory Statistics. October 10, 2011 9 / 37

Page 15: STAT1306_11-12_T05_Slides

Problems Continuous Random Variables

For a function

f (x) =

{(ρ− 1)x−ρ x ≥ 1

0 x < 1,

where ρ > 1.

(a) Is f (x) a density function? Why?

(b) Find F (x).

Jun FU (S&AS, HKU) STAT1306 Introductory Statistics. October 10, 2011 9 / 37

Page 16: STAT1306_11-12_T05_Slides

Problems Continuous Random Variables

Question (a): Is f (x) a density function?

To determine whether a function f (x) is a p.d.f., we just need to check{fX (x) ≥ 0 ∀x ,´∞−∞ fX (x)dx = 1.

First, since ρ > 1, we have

f (x) =

{(ρ− 1)x−ρ ≥ 0 x ≥ 1

0 x < 1.

Second, we haveˆ ∞−∞

f (x)dx =

ˆ ∞1

(ρ− 1)x−ρdx

= −x−ρ+1∣∣∞1

= 1.

Jun FU (S&AS, HKU) STAT1306 Introductory Statistics. October 10, 2011 10 / 37

Page 17: STAT1306_11-12_T05_Slides

Problems Continuous Random Variables

Question (a): Is f (x) a density function?

To determine whether a function f (x) is a p.d.f., we just need to check{fX (x) ≥ 0 ∀x ,´∞−∞ fX (x)dx = 1.

First, since ρ > 1, we have

f (x) =

{(ρ− 1)x−ρ ≥ 0 x ≥ 1

0 x < 1.

Second, we haveˆ ∞−∞

f (x)dx =

ˆ ∞1

(ρ− 1)x−ρdx

= −x−ρ+1∣∣∞1

= 1.

Jun FU (S&AS, HKU) STAT1306 Introductory Statistics. October 10, 2011 10 / 37

Page 18: STAT1306_11-12_T05_Slides

Problems Continuous Random Variables

Question (a): Is f (x) a density function?

To determine whether a function f (x) is a p.d.f., we just need to check{fX (x) ≥ 0 ∀x ,´∞−∞ fX (x)dx = 1.

First, since ρ > 1, we have

f (x) =

{(ρ− 1)x−ρ ≥ 0 x ≥ 1

0 x < 1.

Second, we haveˆ ∞−∞

f (x)dx =

ˆ ∞1

(ρ− 1)x−ρdx

= −x−ρ+1∣∣∞1

= 1.

Jun FU (S&AS, HKU) STAT1306 Introductory Statistics. October 10, 2011 10 / 37

Page 19: STAT1306_11-12_T05_Slides

Problems Continuous Random Variables

Question (b): Find F (x)

By definition, we have for any x ≥ 1

F (x) =

ˆ x

−∞f (y)dy

=

ˆ x

1(ρ− 1)y−ρdy

= −y−ρ+1∣∣x1

= 1− x1−ρ.

Therefore

F (x) =

{1− x1−ρ x ≥ 1

0 x < 1.

Jun FU (S&AS, HKU) STAT1306 Introductory Statistics. October 10, 2011 11 / 37

Page 20: STAT1306_11-12_T05_Slides

Problems Continuous Random Variables

Question (b): Find F (x)

By definition, we have for any x ≥ 1

F (x) =

ˆ x

−∞f (y)dy

=

ˆ x

1(ρ− 1)y−ρdy

= −y−ρ+1∣∣x1

= 1− x1−ρ.

Therefore

F (x) =

{1− x1−ρ x ≥ 1

0 x < 1.

Jun FU (S&AS, HKU) STAT1306 Introductory Statistics. October 10, 2011 11 / 37

Page 21: STAT1306_11-12_T05_Slides

Problems Continuous Random Variables

A college professor never finishes his lecture before the bell rings butalways finishes his lecture within 2 min after the bell rings. Let X =timethat elapses between the ring and the end of the lecture. Suppose theprobability density function of X is

f (x) =

{kx2 0 ≤ x ≤ 2

0 otherwise.

(a) Find the value of k.

(b) What is the probability that the lecture ends within 1 min of the bellringing?

(c) What is the probability that the lecture continues for at least 90 secbeyond the ring?

Jun FU (S&AS, HKU) STAT1306 Introductory Statistics. October 10, 2011 12 / 37

Page 22: STAT1306_11-12_T05_Slides

Problems Continuous Random Variables

A college professor never finishes his lecture before the bell rings butalways finishes his lecture within 2 min after the bell rings. Let X =timethat elapses between the ring and the end of the lecture. Suppose theprobability density function of X is

f (x) =

{kx2 0 ≤ x ≤ 2

0 otherwise.

(a) Find the value of k.

(b) What is the probability that the lecture ends within 1 min of the bellringing?

(c) What is the probability that the lecture continues for at least 90 secbeyond the ring?

Jun FU (S&AS, HKU) STAT1306 Introductory Statistics. October 10, 2011 12 / 37

Page 23: STAT1306_11-12_T05_Slides

Problems Continuous Random Variables

A college professor never finishes his lecture before the bell rings butalways finishes his lecture within 2 min after the bell rings. Let X =timethat elapses between the ring and the end of the lecture. Suppose theprobability density function of X is

f (x) =

{kx2 0 ≤ x ≤ 2

0 otherwise.

(a) Find the value of k.

(b) What is the probability that the lecture ends within 1 min of the bellringing?

(c) What is the probability that the lecture continues for at least 90 secbeyond the ring?

Jun FU (S&AS, HKU) STAT1306 Introductory Statistics. October 10, 2011 12 / 37

Page 24: STAT1306_11-12_T05_Slides

Problems Continuous Random Variables

A college professor never finishes his lecture before the bell rings butalways finishes his lecture within 2 min after the bell rings. Let X =timethat elapses between the ring and the end of the lecture. Suppose theprobability density function of X is

f (x) =

{kx2 0 ≤ x ≤ 2

0 otherwise.

(a) Find the value of k.

(b) What is the probability that the lecture ends within 1 min of the bellringing?

(c) What is the probability that the lecture continues for at least 90 secbeyond the ring?

Jun FU (S&AS, HKU) STAT1306 Introductory Statistics. October 10, 2011 12 / 37

Page 25: STAT1306_11-12_T05_Slides

Problems Continuous Random Variables

Question (a): Find the value of k

By using the property of the p.d.f. we have

1 =

ˆ ∞−∞

f (x)dx

=

ˆ 2

0kx2dx

=x3

3k

∣∣∣∣20

=8

3k.

It implies that

k =3

8.

Jun FU (S&AS, HKU) STAT1306 Introductory Statistics. October 10, 2011 13 / 37

Page 26: STAT1306_11-12_T05_Slides

Problems Continuous Random Variables

Question (a): Find the value of k

By using the property of the p.d.f. we have

1 =

ˆ ∞−∞

f (x)dx

=

ˆ 2

0kx2dx

=x3

3k

∣∣∣∣20

=8

3k.

It implies that

k =3

8.

Jun FU (S&AS, HKU) STAT1306 Introductory Statistics. October 10, 2011 13 / 37

Page 27: STAT1306_11-12_T05_Slides

Problems Continuous Random Variables

Question (b&c): End within 1 min? Continue for 90 sec?

For Q (b), the probability can be calculated as

P(X ≤ 1) =

ˆ 1

0

3

8x2dx =

x3

3· 3

8

∣∣∣∣10

=1

8.

For Q (c), the probability can be calculated as

P(X ≥ 1.5) =

ˆ 2

1.5

3

8x2dx

=x3

3· 3

8

∣∣∣∣21.5

=3

8

(8

3− 1.53

3

)= 0.578.

Jun FU (S&AS, HKU) STAT1306 Introductory Statistics. October 10, 2011 14 / 37

Page 28: STAT1306_11-12_T05_Slides

Problems Continuous Random Variables

Question (b&c): End within 1 min? Continue for 90 sec?

For Q (b), the probability can be calculated as

P(X ≤ 1) =

ˆ 1

0

3

8x2dx =

x3

3· 3

8

∣∣∣∣10

=1

8.

For Q (c), the probability can be calculated as

P(X ≥ 1.5) =

ˆ 2

1.5

3

8x2dx

=x3

3· 3

8

∣∣∣∣21.5

=3

8

(8

3− 1.53

3

)= 0.578.

Jun FU (S&AS, HKU) STAT1306 Introductory Statistics. October 10, 2011 14 / 37

Page 29: STAT1306_11-12_T05_Slides

Problems Continuous Random Variables

Independent observations are made on a random variable X whoseprobability density function is

f (x) =

{0.125x 0 ≤ x ≤ 4

0 otherwise.

(a) Find the mean and variance of X .

(b) Find P(X > 3).

(c) Find the probability that at least three observations are required toobtain a result of x > 3.

Jun FU (S&AS, HKU) STAT1306 Introductory Statistics. October 10, 2011 15 / 37

Page 30: STAT1306_11-12_T05_Slides

Problems Continuous Random Variables

Independent observations are made on a random variable X whoseprobability density function is

f (x) =

{0.125x 0 ≤ x ≤ 4

0 otherwise.

(a) Find the mean and variance of X .

(b) Find P(X > 3).

(c) Find the probability that at least three observations are required toobtain a result of x > 3.

Jun FU (S&AS, HKU) STAT1306 Introductory Statistics. October 10, 2011 15 / 37

Page 31: STAT1306_11-12_T05_Slides

Problems Continuous Random Variables

Independent observations are made on a random variable X whoseprobability density function is

f (x) =

{0.125x 0 ≤ x ≤ 4

0 otherwise.

(a) Find the mean and variance of X .

(b) Find P(X > 3).

(c) Find the probability that at least three observations are required toobtain a result of x > 3.

Jun FU (S&AS, HKU) STAT1306 Introductory Statistics. October 10, 2011 15 / 37

Page 32: STAT1306_11-12_T05_Slides

Problems Continuous Random Variables

Independent observations are made on a random variable X whoseprobability density function is

f (x) =

{0.125x 0 ≤ x ≤ 4

0 otherwise.

(a) Find the mean and variance of X .

(b) Find P(X > 3).

(c) Find the probability that at least three observations are required toobtain a result of x > 3.

Jun FU (S&AS, HKU) STAT1306 Introductory Statistics. October 10, 2011 15 / 37

Page 33: STAT1306_11-12_T05_Slides

Problems Continuous Random Variables

Question (a): Find the mean and variance of X

E (X ) =

ˆ ∞−∞

x · f (x)dx =

ˆ 4

00.125x2dx = 0.125 · x

3

3

∣∣∣∣40

=8

3.

Var(X ) = E[(X − EX )2

]= E (X 2)− (EX )2

=

ˆ ∞−∞

x2 · f (x)dx − (8

3)2

=

ˆ 4

00.125x3dx − (

8

3)2

= 0.125 · x4

4

∣∣∣∣40

− 64

9

=8

9.

.Jun FU (S&AS, HKU) STAT1306 Introductory Statistics. October 10, 2011 16 / 37

Page 34: STAT1306_11-12_T05_Slides

Problems Continuous Random Variables

Question (a): Find the mean and variance of X

E (X ) =

ˆ ∞−∞

x · f (x)dx =

ˆ 4

00.125x2dx = 0.125 · x

3

3

∣∣∣∣40

=8

3.

Var(X ) = E[(X − EX )2

]= E (X 2)− (EX )2

=

ˆ ∞−∞

x2 · f (x)dx − (8

3)2

=

ˆ 4

00.125x3dx − (

8

3)2

= 0.125 · x4

4

∣∣∣∣40

− 64

9

=8

9.

.Jun FU (S&AS, HKU) STAT1306 Introductory Statistics. October 10, 2011 16 / 37

Page 35: STAT1306_11-12_T05_Slides

Problems Continuous Random Variables

Question(b): Find P(X > 3)

The P(X > 3) can be calculated as follows

P(X > 3) =

ˆ 4

3f (x)dx

=

ˆ 4

30.125 · xdx

= 0.125 · x2

2

∣∣∣∣43

=7

16.

Jun FU (S&AS, HKU) STAT1306 Introductory Statistics. October 10, 2011 17 / 37

Page 36: STAT1306_11-12_T05_Slides

Problems Continuous Random Variables

Question(c): At least three observations are required

Let Y =the number of observations required to obtain a result of x > 3,then

Y ∼ Geometric(7

16).

We just need to calculate

P(Y ≥ 3) = (1− 7

16)2 =

81

256,

since that “at least three trials” are required is equivalent with that “thefirst two trials” are failure.

Jun FU (S&AS, HKU) STAT1306 Introductory Statistics. October 10, 2011 18 / 37

Page 37: STAT1306_11-12_T05_Slides

Problems Continuous Random Variables

Question(c): At least three observations are required

Let Y =the number of observations required to obtain a result of x > 3,then

Y ∼ Geometric(7

16).

We just need to calculate

P(Y ≥ 3) = (1− 7

16)2 =

81

256,

since that “at least three trials” are required is equivalent with that “thefirst two trials” are failure.

Jun FU (S&AS, HKU) STAT1306 Introductory Statistics. October 10, 2011 18 / 37

Page 38: STAT1306_11-12_T05_Slides

Problems Some Questions from Assignments

Game Plan

1 Review of Key Concepts

Basic Definitions

Comparison Between Discrete and Continuous Random Variables

2 Problems

Continuous Random Variables

Some Questions from Assignments

3 Ending

Jun FU (S&AS, HKU) STAT1306 Introductory Statistics. October 10, 2011 19 / 37

Page 39: STAT1306_11-12_T05_Slides

Problems Some Questions from Assignments

Assume that every time you buy an item of the Hong Kong Disney series,you receive one of the four types of cards, each with a cartoon characterMickey, Minnie, Donald and Daisy with an equal probability. Over a periodof time, you buy 6 items of the series. What is the probability that you willget all four cards?

Jun FU (S&AS, HKU) STAT1306 Introductory Statistics. October 10, 2011 20 / 37

Page 40: STAT1306_11-12_T05_Slides

Problems Some Questions from Assignments

Method (1): “Three of a kind” (e.g. A× 3,B ,C ,D)

The probability that the six items show A,A,A,B,C ,D in that order is:

(1

4)6

The no. of ways of arranging A,A,A,B,C ,D in a sequence is

6!

3! · 1! · 1! · 1!

The no. of ways of determining which letter appears three times is

4C1

Jun FU (S&AS, HKU) STAT1306 Introductory Statistics. October 10, 2011 21 / 37

Page 41: STAT1306_11-12_T05_Slides

Problems Some Questions from Assignments

Method (1): “Three of a kind” (e.g. A× 3,B ,C ,D)

The probability that the six items show A,A,A,B,C ,D in that order is:

(1

4)6

The no. of ways of arranging A,A,A,B,C ,D in a sequence is

6!

3! · 1! · 1! · 1!

The no. of ways of determining which letter appears three times is

4C1

Jun FU (S&AS, HKU) STAT1306 Introductory Statistics. October 10, 2011 21 / 37

Page 42: STAT1306_11-12_T05_Slides

Problems Some Questions from Assignments

Method (1): “Three of a kind” (e.g. A× 3,B ,C ,D)

The probability that the six items show A,A,A,B,C ,D in that order is:

(1

4)6

The no. of ways of arranging A,A,A,B,C ,D in a sequence is

6!

3! · 1! · 1! · 1!

The no. of ways of determining which letter appears three times is

4C1

Jun FU (S&AS, HKU) STAT1306 Introductory Statistics. October 10, 2011 21 / 37

Page 43: STAT1306_11-12_T05_Slides

Problems Some Questions from Assignments

Method (1): “Two pairs” (e.g. A× 2,B × 2,C ,D)

The probability that the six items show A,A,B,B,C ,D in that order is:

(1

4)6

The no. of ways of arranging A,A,B,B,C ,D in a sequence is

6!

2! · 2! · 1! · 1!

The no. of ways of determining which letters appear twice is

4C2

Jun FU (S&AS, HKU) STAT1306 Introductory Statistics. October 10, 2011 22 / 37

Page 44: STAT1306_11-12_T05_Slides

Problems Some Questions from Assignments

Method (1): “Two pairs” (e.g. A× 2,B × 2,C ,D)

The probability that the six items show A,A,B,B,C ,D in that order is:

(1

4)6

The no. of ways of arranging A,A,B,B,C ,D in a sequence is

6!

2! · 2! · 1! · 1!

The no. of ways of determining which letters appear twice is

4C2

Jun FU (S&AS, HKU) STAT1306 Introductory Statistics. October 10, 2011 22 / 37

Page 45: STAT1306_11-12_T05_Slides

Problems Some Questions from Assignments

Method (1): “Two pairs” (e.g. A× 2,B × 2,C ,D)

The probability that the six items show A,A,B,B,C ,D in that order is:

(1

4)6

The no. of ways of arranging A,A,B,B,C ,D in a sequence is

6!

2! · 2! · 1! · 1!

The no. of ways of determining which letters appear twice is

4C2

Jun FU (S&AS, HKU) STAT1306 Introductory Statistics. October 10, 2011 22 / 37

Page 46: STAT1306_11-12_T05_Slides

Problems Some Questions from Assignments

Method (1): Final result

In sum, the probability that we will collect all of the four letters is

(1

4)6 × 6!

3! · 1! · 1! · 1!× 4C1 + (

1

4)6 × 6!

2! · 2! · 1! · 1!× 4C2.

The final answer is1560

46= 0.3809.

Jun FU (S&AS, HKU) STAT1306 Introductory Statistics. October 10, 2011 23 / 37

Page 47: STAT1306_11-12_T05_Slides

Problems Some Questions from Assignments

Method (1): Final result

In sum, the probability that we will collect all of the four letters is

(1

4)6 × 6!

3! · 1! · 1! · 1!× 4C1 + (

1

4)6 × 6!

2! · 2! · 1! · 1!× 4C2.

The final answer is1560

46= 0.3809.

Jun FU (S&AS, HKU) STAT1306 Introductory Statistics. October 10, 2011 23 / 37

Page 48: STAT1306_11-12_T05_Slides

Problems Some Questions from Assignments

Method (2): Consider whether the letter is a different one

Let N denote that the letter is a new one;Let O denote that the letter is an old one.For example, the probability for the result of

NNONN

can be calculated

1× 3

4× 2

4× 2

4× 1

4.

Jun FU (S&AS, HKU) STAT1306 Introductory Statistics. October 10, 2011 24 / 37

Page 49: STAT1306_11-12_T05_Slides

Problems Some Questions from Assignments

Method (2): Consider whether the letter is a different one

Let N denote that the letter is a new one;Let O denote that the letter is an old one.For example, the probability for the result of

NNONN

can be calculated

1× 3

4× 2

4× 2

4× 1

4.

Jun FU (S&AS, HKU) STAT1306 Introductory Statistics. October 10, 2011 24 / 37

Page 50: STAT1306_11-12_T05_Slides

Problems Some Questions from Assignments

Method (2) (Cont.)

Number Outcome Probability4 NNNN 1× 3

4 ×24 ×

14

NONNN 1× 14 ×

34 ×

24 ×

14

5 NNONN 1× 34 ×

24 ×

24 ×

14

NNNON 1× 34 ×

24 ×

34 ×

14

NNNOON 1× 34 ×

24 ×

34 ×

34 ×

14

NOONNN 1× 14 ×

14 ×

34 ×

24 ×

14

6 NNOONN 1× 34 ×

24 ×

24 ×

24 ×

14

NONNON 1× 14 ×

34 ×

24 ×

34 ×

14

NONONN 1× 14 ×

34 ×

24 ×

24 ×

14

NNONON 1× 34 ×

24 ×

24 ×

34 ×

14

Jun FU (S&AS, HKU) STAT1306 Introductory Statistics. October 10, 2011 25 / 37

Page 51: STAT1306_11-12_T05_Slides

Problems Some Questions from Assignments

If n persons, including A and B, are randomly arranged in a straight line,what is the probability that there are exactly r persons in the line betweenA and B.

Jun FU (S&AS, HKU) STAT1306 Introductory Statistics. October 10, 2011 26 / 37

Page 52: STAT1306_11-12_T05_Slides

Problems Some Questions from Assignments

Method(1): Select two positions from n positions

It is essentially to select two positions from the n positions in a line.First, the no. of ways to select two positions from the n positions suchthat there are exactly r positions between them is

n − r − 1.

Second, the no. of ways to select two positions from the n positions is

nC2.

Therefore, the probability required to calculate is

n − r − 1

nC2.

Jun FU (S&AS, HKU) STAT1306 Introductory Statistics. October 10, 2011 27 / 37

Page 53: STAT1306_11-12_T05_Slides

Problems Some Questions from Assignments

Method(1): Select two positions from n positions

It is essentially to select two positions from the n positions in a line.First, the no. of ways to select two positions from the n positions suchthat there are exactly r positions between them is

n − r − 1.

Second, the no. of ways to select two positions from the n positions is

nC2.

Therefore, the probability required to calculate is

n − r − 1

nC2.

Jun FU (S&AS, HKU) STAT1306 Introductory Statistics. October 10, 2011 27 / 37

Page 54: STAT1306_11-12_T05_Slides

Problems Some Questions from Assignments

Method(1): Select two positions from n positions

It is essentially to select two positions from the n positions in a line.First, the no. of ways to select two positions from the n positions suchthat there are exactly r positions between them is

n − r − 1.

Second, the no. of ways to select two positions from the n positions is

nC2.

Therefore, the probability required to calculate is

n − r − 1

nC2.

Jun FU (S&AS, HKU) STAT1306 Introductory Statistics. October 10, 2011 27 / 37

Page 55: STAT1306_11-12_T05_Slides

Problems Some Questions from Assignments

Method(1): Select two positions from n positions

It is essentially to select two positions from the n positions in a line.First, the no. of ways to select two positions from the n positions suchthat there are exactly r positions between them is

n − r − 1.

Second, the no. of ways to select two positions from the n positions is

nC2.

Therefore, the probability required to calculate is

n − r − 1

nC2.

Jun FU (S&AS, HKU) STAT1306 Introductory Statistics. October 10, 2011 27 / 37

Page 56: STAT1306_11-12_T05_Slides

Problems Some Questions from Assignments

Method(2): No. of solutions to an equation

Let L =no. of persons on the left of the two persons;Let M =no. of persons between the two persons;Let R =no. of persons on the right of the two persons. Then we have

L + M + R = n − 2.

First, if we require M = r , then the equation can be deduced to

L + R = n − 2− r .

The no. of solutions to this equation is

n−r−1C1 = n − r − 1.

Second, the no. of solutions to the original equation is

nC2.

Jun FU (S&AS, HKU) STAT1306 Introductory Statistics. October 10, 2011 28 / 37

Page 57: STAT1306_11-12_T05_Slides

Problems Some Questions from Assignments

Method(2): No. of solutions to an equation

Let L =no. of persons on the left of the two persons;Let M =no. of persons between the two persons;Let R =no. of persons on the right of the two persons. Then we have

L + M + R = n − 2.

First, if we require M = r , then the equation can be deduced to

L + R = n − 2− r .

The no. of solutions to this equation is

n−r−1C1 = n − r − 1.

Second, the no. of solutions to the original equation is

nC2.

Jun FU (S&AS, HKU) STAT1306 Introductory Statistics. October 10, 2011 28 / 37

Page 58: STAT1306_11-12_T05_Slides

Problems Some Questions from Assignments

Method(2): No. of solutions to an equation

Let L =no. of persons on the left of the two persons;Let M =no. of persons between the two persons;Let R =no. of persons on the right of the two persons. Then we have

L + M + R = n − 2.

First, if we require M = r , then the equation can be deduced to

L + R = n − 2− r .

The no. of solutions to this equation is

n−r−1C1 = n − r − 1.

Second, the no. of solutions to the original equation is

nC2.

Jun FU (S&AS, HKU) STAT1306 Introductory Statistics. October 10, 2011 28 / 37

Page 59: STAT1306_11-12_T05_Slides

Problems Some Questions from Assignments

Method(2): No. of solutions to an equation

Let L =no. of persons on the left of the two persons;Let M =no. of persons between the two persons;Let R =no. of persons on the right of the two persons. Then we have

L + M + R = n − 2.

First, if we require M = r , then the equation can be deduced to

L + R = n − 2− r .

The no. of solutions to this equation is

n−r−1C1 = n − r − 1.

Second, the no. of solutions to the original equation is

nC2.

Jun FU (S&AS, HKU) STAT1306 Introductory Statistics. October 10, 2011 28 / 37

Page 60: STAT1306_11-12_T05_Slides

Problems Some Questions from Assignments

A communication system consists of n components each of which will,independently, function with probability p. The whole system will be ableto operate effectively if at least one half-of its components function. Ingeneral, when is a (2k + 1) component system better than a (2k − 1)component system?

Jun FU (S&AS, HKU) STAT1306 Introductory Statistics. October 10, 2011 29 / 37

Page 61: STAT1306_11-12_T05_Slides

Problems Some Questions from Assignments

The (2k + 1) component system

We divide it into two parts:

(2k − 1) component sub-system + (2) component sub-system.

Let X1 =No. of components which can function in the (2k − 1) - system

X1 ∼ Bin(2k − 1, p).

Let Y =No. of components which can function in the (2) - system

Y ∼ Bin(2, p).

To make this (2k + 1) component system operate, we need to have

X1 + Y ≥ k + 1.

Jun FU (S&AS, HKU) STAT1306 Introductory Statistics. October 10, 2011 30 / 37

Page 62: STAT1306_11-12_T05_Slides

Problems Some Questions from Assignments

The (2k + 1) component system

We divide it into two parts:

(2k − 1) component sub-system + (2) component sub-system.

Let X1 =No. of components which can function in the (2k − 1) - system

X1 ∼ Bin(2k − 1, p).

Let Y =No. of components which can function in the (2) - system

Y ∼ Bin(2, p).

To make this (2k + 1) component system operate, we need to have

X1 + Y ≥ k + 1.

Jun FU (S&AS, HKU) STAT1306 Introductory Statistics. October 10, 2011 30 / 37

Page 63: STAT1306_11-12_T05_Slides

Problems Some Questions from Assignments

The (2k + 1) component system

We divide it into two parts:

(2k − 1) component sub-system + (2) component sub-system.

Let X1 =No. of components which can function in the (2k − 1) - system

X1 ∼ Bin(2k − 1, p).

Let Y =No. of components which can function in the (2) - system

Y ∼ Bin(2, p).

To make this (2k + 1) component system operate, we need to have

X1 + Y ≥ k + 1.

Jun FU (S&AS, HKU) STAT1306 Introductory Statistics. October 10, 2011 30 / 37

Page 64: STAT1306_11-12_T05_Slides

Problems Some Questions from Assignments

The (2k + 1) component system

We divide it into two parts:

(2k − 1) component sub-system + (2) component sub-system.

Let X1 =No. of components which can function in the (2k − 1) - system

X1 ∼ Bin(2k − 1, p).

Let Y =No. of components which can function in the (2) - system

Y ∼ Bin(2, p).

To make this (2k + 1) component system operate, we need to have

X1 + Y ≥ k + 1.

Jun FU (S&AS, HKU) STAT1306 Introductory Statistics. October 10, 2011 30 / 37

Page 65: STAT1306_11-12_T05_Slides

Problems Some Questions from Assignments

The (2k − 1) component system

Let X2 =No. of components which can function in this system, and

X2 ∼ Bin(2k − 1, p).

To make this (2k − 1) component system operate, we need to have

X2 ≥ k.

Jun FU (S&AS, HKU) STAT1306 Introductory Statistics. October 10, 2011 31 / 37

Page 66: STAT1306_11-12_T05_Slides

Problems Some Questions from Assignments

The (2k − 1) component system

Let X2 =No. of components which can function in this system, and

X2 ∼ Bin(2k − 1, p).

To make this (2k − 1) component system operate, we need to have

X2 ≥ k.

Jun FU (S&AS, HKU) STAT1306 Introductory Statistics. October 10, 2011 31 / 37

Page 67: STAT1306_11-12_T05_Slides

Problems Some Questions from Assignments

(2k + 1) - system (X1 + Y ) v.s. (2k − 1) - system (X2)

For the (2k + 1) component system, we calculate

P(X1 + Y ≥ k + 1)

= P(X1 ≥ k − 1 ∩ Y = 2) + P(X1 ≥ k ∩ Y = 1) + P(X1 ≥ k + 1 ∩ Y = 0).

Hence,

P(X1 + Y ≥ k + 1)

= P(X1 ≥ k ∩ Y = 2) + P(X1 = k − 1 ∩ Y = 2)

+ P(X1 ≥ k ∩ Y = 1)

+ P(X1 ≥ k ∩ Y = 0)− P(X1 = k ∩ Y = 0).

Therefore, the probability that it can operate is

P(X1 ≥ k) + [P(X1 = k − 1) · P(Y = 2)− P(X1 = k)P(Y = 0)] .

Jun FU (S&AS, HKU) STAT1306 Introductory Statistics. October 10, 2011 32 / 37

Page 68: STAT1306_11-12_T05_Slides

Problems Some Questions from Assignments

(2k + 1) - system (X1 + Y ) v.s. (2k − 1) - system (X2)

For the (2k + 1) component system, we calculate

P(X1 + Y ≥ k + 1)

= P(X1 ≥ k − 1 ∩ Y = 2) + P(X1 ≥ k ∩ Y = 1) + P(X1 ≥ k + 1 ∩ Y = 0).

Hence,

P(X1 + Y ≥ k + 1)

= P(X1 ≥ k ∩ Y = 2) + P(X1 = k − 1 ∩ Y = 2)

+ P(X1 ≥ k ∩ Y = 1)

+ P(X1 ≥ k ∩ Y = 0)− P(X1 = k ∩ Y = 0).

Therefore, the probability that it can operate is

P(X1 ≥ k) + [P(X1 = k − 1) · P(Y = 2)− P(X1 = k)P(Y = 0)] .

Jun FU (S&AS, HKU) STAT1306 Introductory Statistics. October 10, 2011 32 / 37

Page 69: STAT1306_11-12_T05_Slides

Problems Some Questions from Assignments

(2k + 1) - system (X1 + Y ) v.s. (2k − 1) - system (X2)

For the (2k + 1) component system, we calculate

P(X1 + Y ≥ k + 1)

= P(X1 ≥ k − 1 ∩ Y = 2) + P(X1 ≥ k ∩ Y = 1) + P(X1 ≥ k + 1 ∩ Y = 0).

Hence,

P(X1 + Y ≥ k + 1)

= P(X1 ≥ k ∩ Y = 2) + P(X1 = k − 1 ∩ Y = 2)

+ P(X1 ≥ k ∩ Y = 1)

+ P(X1 ≥ k ∩ Y = 0)− P(X1 = k ∩ Y = 0).

Therefore, the probability that it can operate is

P(X1 ≥ k) + [P(X1 = k − 1) · P(Y = 2)− P(X1 = k)P(Y = 0)] .

Jun FU (S&AS, HKU) STAT1306 Introductory Statistics. October 10, 2011 32 / 37

Page 70: STAT1306_11-12_T05_Slides

Problems Some Questions from Assignments

Final result

To make the (2k + 1) - system better than the (2k − 1) - system, we justneed to make

P(X1 = k − 1) · P(Y = 2) > P(X1 = k)P(Y = 0).

This is equivalent to

2k−1Ck−1 · pk−1(1− p)k · p2 ≥ 2k−1Ck · pk(1− p)k−1 · (1− p)2.

Hence,

p ≥ 1− p ⇐⇒ 1

2≤ p ≤ 1.

Jun FU (S&AS, HKU) STAT1306 Introductory Statistics. October 10, 2011 33 / 37

Page 71: STAT1306_11-12_T05_Slides

Problems Some Questions from Assignments

Final result

To make the (2k + 1) - system better than the (2k − 1) - system, we justneed to make

P(X1 = k − 1) · P(Y = 2) > P(X1 = k)P(Y = 0).

This is equivalent to

2k−1Ck−1 · pk−1(1− p)k · p2 ≥ 2k−1Ck · pk(1− p)k−1 · (1− p)2.

Hence,

p ≥ 1− p ⇐⇒ 1

2≤ p ≤ 1.

Jun FU (S&AS, HKU) STAT1306 Introductory Statistics. October 10, 2011 33 / 37

Page 72: STAT1306_11-12_T05_Slides

Problems Some Questions from Assignments

Final result

To make the (2k + 1) - system better than the (2k − 1) - system, we justneed to make

P(X1 = k − 1) · P(Y = 2) > P(X1 = k)P(Y = 0).

This is equivalent to

2k−1Ck−1 · pk−1(1− p)k · p2 ≥ 2k−1Ck · pk(1− p)k−1 · (1− p)2.

Hence,

p ≥ 1− p ⇐⇒ 1

2≤ p ≤ 1.

Jun FU (S&AS, HKU) STAT1306 Introductory Statistics. October 10, 2011 33 / 37

Page 73: STAT1306_11-12_T05_Slides

Problems Some Questions from Assignments

Exactly one of six similar keys opens a certain door. If you try the keys oneafter another, what is the expected number of keys that you will have totry before success?

Jun FU (S&AS, HKU) STAT1306 Introductory Statistics. October 10, 2011 34 / 37

Page 74: STAT1306_11-12_T05_Slides

Problems Some Questions from Assignments

Solution

Note: The number of keys required to succeed does not follow a geometricdistribution, since the first trial is not independent with the second trial.To try the keys one after another is essentially to arrange six keys in asequence.The correct key is equally likely to be one of the six ones and the numberof trials required follows a uniform distribution with possible values:

1, 2, 3, 4, 5, 6.

Its expectation can be given by

1 + 2 + 3 + 4 + 5 + 6

6= 3.5.

Jun FU (S&AS, HKU) STAT1306 Introductory Statistics. October 10, 2011 35 / 37

Page 75: STAT1306_11-12_T05_Slides

Problems Some Questions from Assignments

Solution

Note: The number of keys required to succeed does not follow a geometricdistribution, since the first trial is not independent with the second trial.To try the keys one after another is essentially to arrange six keys in asequence.The correct key is equally likely to be one of the six ones and the numberof trials required follows a uniform distribution with possible values:

1, 2, 3, 4, 5, 6.

Its expectation can be given by

1 + 2 + 3 + 4 + 5 + 6

6= 3.5.

Jun FU (S&AS, HKU) STAT1306 Introductory Statistics. October 10, 2011 35 / 37

Page 76: STAT1306_11-12_T05_Slides

Problems Some Questions from Assignments

Solution

Note: The number of keys required to succeed does not follow a geometricdistribution, since the first trial is not independent with the second trial.To try the keys one after another is essentially to arrange six keys in asequence.The correct key is equally likely to be one of the six ones and the numberof trials required follows a uniform distribution with possible values:

1, 2, 3, 4, 5, 6.

Its expectation can be given by

1 + 2 + 3 + 4 + 5 + 6

6= 3.5.

Jun FU (S&AS, HKU) STAT1306 Introductory Statistics. October 10, 2011 35 / 37

Page 77: STAT1306_11-12_T05_Slides

Problems Some Questions from Assignments

Solution

Note: The number of keys required to succeed does not follow a geometricdistribution, since the first trial is not independent with the second trial.To try the keys one after another is essentially to arrange six keys in asequence.The correct key is equally likely to be one of the six ones and the numberof trials required follows a uniform distribution with possible values:

1, 2, 3, 4, 5, 6.

Its expectation can be given by

1 + 2 + 3 + 4 + 5 + 6

6= 3.5.

Jun FU (S&AS, HKU) STAT1306 Introductory Statistics. October 10, 2011 35 / 37

Page 78: STAT1306_11-12_T05_Slides

Ending

Game Plan

1 Review of Key Concepts

Basic Definitions

Comparison Between Discrete and Continuous Random Variables

2 Problems

Continuous Random Variables

Some Questions from Assignments

3 Ending

Jun FU (S&AS, HKU) STAT1306 Introductory Statistics. October 10, 2011 36 / 37

Page 79: STAT1306_11-12_T05_Slides

Ending

Goodbye and See You

See You After Reading Week (Oct 24,26)

Same Time

Same Place

Jun FU (S&AS, HKU) STAT1306 Introductory Statistics. October 10, 2011 37 / 37