© Boardworks Ltd 20051 of 39 © Boardworks Ltd 2005 1 of 39 AS-Level Maths: Statistics 1 for...

39
© Boardworks Ltd 2005 1 of 39 © Boardworks Ltd 2005 1 of 39 AS-Level Maths: Statistics 1 for Edexcel S1.5 Discrete random variables This icon indicates the slide contains activities created in Flash. These activities are not edit For more detailed instructions, see the Getting Started presentation.

Transcript of © Boardworks Ltd 20051 of 39 © Boardworks Ltd 2005 1 of 39 AS-Level Maths: Statistics 1 for...

Page 1: © Boardworks Ltd 20051 of 39 © Boardworks Ltd 2005 1 of 39 AS-Level Maths: Statistics 1 for Edexcel S1.5 Discrete random variables This icon indicates.

© Boardworks Ltd 20051 of 39 © Boardworks Ltd 20051 of 39

AS-Level Maths: Statistics 1for Edexcel

S1.5 Discrete random variables

This icon indicates the slide contains activities created in Flash. These activities are not editable.

For more detailed instructions, see the Getting Started presentation.

Page 2: © Boardworks Ltd 20051 of 39 © Boardworks Ltd 2005 1 of 39 AS-Level Maths: Statistics 1 for Edexcel S1.5 Discrete random variables This icon indicates.

© Boardworks Ltd 20052 of 39

Co

nte

nts

© Boardworks Ltd 20052 of 39

Discrete random variables

Introduction to discrete random variables

Cumulative distribution functions

Expectation

Variance and standard deviation for random variables

Discrete uniform distribution

Expectation algebra – some key results

Page 3: © Boardworks Ltd 20051 of 39 © Boardworks Ltd 2005 1 of 39 AS-Level Maths: Statistics 1 for Edexcel S1.5 Discrete random variables This icon indicates.

© Boardworks Ltd 20053 of 39

The following are all examples of random variables:

Discrete random variables

The first three examples above are all discrete random variables – they all take whole number values.

In general, a random variable (r.v.) is a quantity whose value cannot be predicted with certainty before an experiment or enquiry is undertaken.

the number of heads obtained when a coin is tossed four times;

the number of prizes I win if I buy 10 tickets in a raffle;

the number of cars that pass a checkpoint in a minute;

the time (in seconds) it takes to run a 100m race.

Page 4: © Boardworks Ltd 20051 of 39 © Boardworks Ltd 2005 1 of 39 AS-Level Maths: Statistics 1 for Edexcel S1.5 Discrete random variables This icon indicates.

© Boardworks Ltd 20054 of 39

A dice is thrown. Let X be the score obtained.

The possible outcomes of this experiment are the values 1, 2, 3, 4, 5 and 6.

These outcomes can be shown in a table, along with their corresponding probabilities:

x 1 2 3 4 5 6

P(X = x)

Discrete random variables

1

6

1

6

1

6

1

6

This table is called the probability distribution of X.

Notice that a lower case x is used to denote a particular possible outcome.

A random variable is usually denoted by a capital letter.

1

6

1

6

Page 5: © Boardworks Ltd 20051 of 39 © Boardworks Ltd 2005 1 of 39 AS-Level Maths: Statistics 1 for Edexcel S1.5 Discrete random variables This icon indicates.

© Boardworks Ltd 20055 of 39

The probability distribution of a general discrete random variable, X, is a list or table of all its possible values, together with the corresponding probabilities:

Discrete random variables

x x1 x2 x3 … xn

P(X = x) p1 p2 p3 … pn

An important property of discrete random variables is:

i.e.

...1 2 1np p p

1ii

p

Note: the probabilities may sometimes be given as a formula rather than listed in a table.

Page 6: © Boardworks Ltd 20051 of 39 © Boardworks Ltd 2005 1 of 39 AS-Level Maths: Statistics 1 for Edexcel S1.5 Discrete random variables This icon indicates.

© Boardworks Ltd 20056 of 39

Example: The probability distribution of a discrete random variable Y is given below:

Discrete random variables

y 0 1 2 3 4

P(Y = y) c 2c 3c 2c c

Find c and P(Y > 2).

As , c + 2c + 3c + 2c + c = 1

So, 9c = 1

Therefore c =

1ii

p

P(Y > 2) = P(Y = 3 or 4) = 2c + c = 2

9

11

9 3

19

Page 7: © Boardworks Ltd 20051 of 39 © Boardworks Ltd 2005 1 of 39 AS-Level Maths: Statistics 1 for Edexcel S1.5 Discrete random variables This icon indicates.

© Boardworks Ltd 20057 of 39

Examination-style question: A bag contains 5 green counters and 2 red counters. John randomly takes counters from the bag, without replacement, until he draws a green counter.

The total number of counters picked out until the first green counter appears is denoted X.

Find the probability distribution of X.

Discrete random variables

Page 8: © Boardworks Ltd 20051 of 39 © Boardworks Ltd 2005 1 of 39 AS-Level Maths: Statistics 1 for Edexcel S1.5 Discrete random variables This icon indicates.

© Boardworks Ltd 20058 of 39

G

G

G

R

R 1

5

7

Discrete random variables

2

7

5

6

1

6

P(X = 1) =

P(X = 2) =

P(X = 3) =

5

7

2 5 5

7 6 21

2 1 11

7 6 21

x 1 2 3

P(X = x)

So the probability distribution of X is:

5

7

1

21

5

21

Page 9: © Boardworks Ltd 20051 of 39 © Boardworks Ltd 2005 1 of 39 AS-Level Maths: Statistics 1 for Edexcel S1.5 Discrete random variables This icon indicates.

© Boardworks Ltd 20059 of 39

Co

nte

nts

© Boardworks Ltd 20059 of 39

Introduction to discrete random variables

Cumulative distribution functions

Expectation

Variance and standard deviation for random variables

Discrete uniform distribution

Expectation algebra – some key results

Cumulative distribution functions

Page 10: © Boardworks Ltd 20051 of 39 © Boardworks Ltd 2005 1 of 39 AS-Level Maths: Statistics 1 for Edexcel S1.5 Discrete random variables This icon indicates.

© Boardworks Ltd 200510 of 39

The cumulative distribution function (c.d.f.), F(x) for a discrete random variable X is defined as:

x 5 10 15 20 25 30

P(X = x) 0.1 0.2 0.2 0.3 0.1 0.1

Cumulative distribution functions

x 5 10 15 20 25 30

F(x) 0.1 0.3 0.5 0.8 0.9 1

F(x) = P(X ≤ x)F(x) = P(X ≤ x)

then it has the cumulative distribution function shown in the table below:

If X has the following probability distribution:

Page 11: © Boardworks Ltd 20051 of 39 © Boardworks Ltd 2005 1 of 39 AS-Level Maths: Statistics 1 for Edexcel S1.5 Discrete random variables This icon indicates.

© Boardworks Ltd 200511 of 39

Cumulative distribution functions

x 1 2 3 4

F(x) k 4k 9k 16k

Examination-style question: The cumulative distribution function, F(x), for a discrete random variable X is defined by the formula

F(x) = kx2 for x = 1, 2, 3, 4.

a) Find the value of k.

b) Find P(X > 2).

a) As x only takes the values 1, …, 4, then F(4) = 1.

So, k =

b) P(X > 2) = P(X = 3, 4) = F(4) – F(2) =

1

161

31

4 4

The c.d.f. can be shown in a table:

Page 12: © Boardworks Ltd 20051 of 39 © Boardworks Ltd 2005 1 of 39 AS-Level Maths: Statistics 1 for Edexcel S1.5 Discrete random variables This icon indicates.

© Boardworks Ltd 200512 of 39

Co

nte

nts

© Boardworks Ltd 200512 of 39

Introduction to discrete random variables

Cumulative distribution functions

Expectation

Variance and standard deviation for random variables

Discrete uniform distribution

Expectation algebra – some key results

Expectation

Page 13: © Boardworks Ltd 20051 of 39 © Boardworks Ltd 2005 1 of 39 AS-Level Maths: Statistics 1 for Edexcel S1.5 Discrete random variables This icon indicates.

© Boardworks Ltd 200513 of 39

Gambling games

Page 14: © Boardworks Ltd 20051 of 39 © Boardworks Ltd 2005 1 of 39 AS-Level Maths: Statistics 1 for Edexcel S1.5 Discrete random variables This icon indicates.

© Boardworks Ltd 200514 of 39

Gambling games

Page 15: © Boardworks Ltd 20051 of 39 © Boardworks Ltd 2005 1 of 39 AS-Level Maths: Statistics 1 for Edexcel S1.5 Discrete random variables This icon indicates.

© Boardworks Ltd 200515 of 39

The theoretical mean, μ, of a discrete random variable X is found by multiplying each possible value of X by its probability, and then adding these products together:

( )Pi i i ii i

x X x x p

Example: The probability distribution of a random variable X is:

Expectation

x –2 –1 0 1

P(X = x) 0.2 0.2 0.2 0.4

E[X] = (–2 × 0.2) + (–1 × 0.2) + (0 × 0.2) + (1 × 0.4) = –0.2

μ is also called the expectation (or expected value) of X, written E[X].

Page 16: © Boardworks Ltd 20051 of 39 © Boardworks Ltd 2005 1 of 39 AS-Level Maths: Statistics 1 for Edexcel S1.5 Discrete random variables This icon indicates.

© Boardworks Ltd 200516 of 39

If a probability distribution is symmetrical, it is possible to write down the expectation without any calculation.

Example: The probability distribution of a random variable M is:

Expectation

m 0 10 20 30 40

P(M = m) 0.05 0.25 0.4 0.25 0.05

This distribution is symmetrical about the value M = 20.

Therefore E[M] = 20.

Page 17: © Boardworks Ltd 20051 of 39 © Boardworks Ltd 2005 1 of 39 AS-Level Maths: Statistics 1 for Edexcel S1.5 Discrete random variables This icon indicates.

© Boardworks Ltd 200517 of 39

Examination-style question: A random variable X has the following probability distribution:

Expectation

x 0 1 2 3 4

P(X = x) 0.05 a 2a b 0.05

a) If E[X] = 1.9, find a and b.

b) Find P(0 ≤ X < 3).

Page 18: © Boardworks Ltd 20051 of 39 © Boardworks Ltd 2005 1 of 39 AS-Level Maths: Statistics 1 for Edexcel S1.5 Discrete random variables This icon indicates.

© Boardworks Ltd 200518 of 39

0.05 + a + 2a + b + 0.05 = 1 3a + b = 0.9 (1)

E[X] = 1.9 (0×0.05) + (1a) + (2×2a) + (3b) + (4×0.05) = 1.9 5a + 3b = 1.7 (2)

Solving equations (1) and (2) simultaneously gives:a = 0.25, b = 0.15

b) P(0 ≤ X < 3) = P( X = 0, 1, 2) = 0.05 + 0.25 + 0.5 = 0.8.

Expectation

1ii

p

a) x 0 1 2 3 4

P(X = x) 0.05 a 2a b 0.05

Page 19: © Boardworks Ltd 20051 of 39 © Boardworks Ltd 2005 1 of 39 AS-Level Maths: Statistics 1 for Edexcel S1.5 Discrete random variables This icon indicates.

© Boardworks Ltd 200519 of 39

If X is a discrete random variable, then the expectation of a function of X, g(X), is:

[ ( )] ( )E i ii

g X g x p

Example: Find E[X2 + 2X] for the following probability distribution:

Expectation of a function of X

x 1 2 3 4

x2 + 2x 3 8 15 24

P(X = x) 0.2 0.2 0.2 0.4

E[X2 + 2X] = (3 × 0.2) + (8 × 0.2) + (15 × 0.2) + (24 × 0.4)

= 0.6 + 1.6 + 3 + 9.6

= 14.8

Page 20: © Boardworks Ltd 20051 of 39 © Boardworks Ltd 2005 1 of 39 AS-Level Maths: Statistics 1 for Edexcel S1.5 Discrete random variables This icon indicates.

© Boardworks Ltd 200520 of 39

Co

nte

nts

© Boardworks Ltd 200520 of 39

Introduction to discrete random variables

Cumulative distribution functions

Expectation

Variance and standard deviation for random variables

Discrete uniform distribution

Expectation algebra – some key results

Variance and standard deviation

Page 21: © Boardworks Ltd 20051 of 39 © Boardworks Ltd 2005 1 of 39 AS-Level Maths: Statistics 1 for Edexcel S1.5 Discrete random variables This icon indicates.

© Boardworks Ltd 200521 of 39

If X is a discrete random variable, then the variance of X is given by the formula:

where μ = E[X].

Note: There is an alternative formula for Var[X] that is usually simpler to use:

i.e., the variance is the mean of the squares minus the square of the mean.

Variance and standard deviation

[ ] ( )2Var E[ ]X X

[ ] 2 2Var E[ ]X X

The standard deviation, σ, is the square root of Var[X].

Page 22: © Boardworks Ltd 20051 of 39 © Boardworks Ltd 2005 1 of 39 AS-Level Maths: Statistics 1 for Edexcel S1.5 Discrete random variables This icon indicates.

© Boardworks Ltd 200522 of 39

Example: X is the random variable representing the score obtained when a normal dice is thrown. Find the mean and the standard deviation of X.

x 1 2 3 4 5 6

P(X = x) 1

6

This probability distribution is symmetrical.

Therefore, E[X] = 3.5

Variance and standard deviation

1

6

1

6

We can write down the probability distribution of X:

1

6

1

6

1

6

Page 23: © Boardworks Ltd 20051 of 39 © Boardworks Ltd 2005 1 of 39 AS-Level Maths: Statistics 1 for Edexcel S1.5 Discrete random variables This icon indicates.

© Boardworks Ltd 200523 of 39

To find the variance and standard deviation, we first need E[X2]:

x2 1 4 9 16 25 36

P(X = x) 1

6

So, [ ] ...2 1 1 1 16 6 6 6

16

E 1 4 9 36

15

X

[ ]21 1

6 21112Var 15 3 2X Therefore,

So, (to 3 s.f.)[ .]Var 1 71X

Variance and standard deviation

1

6

1

6

1

6

1

6

1

6

Page 24: © Boardworks Ltd 20051 of 39 © Boardworks Ltd 2005 1 of 39 AS-Level Maths: Statistics 1 for Edexcel S1.5 Discrete random variables This icon indicates.

© Boardworks Ltd 200524 of 39

Example 2: Peter drives to work every morning, but is frequently late arriving. X is the number of mornings that he is late to work in a given week.

His boss estimates that the probability distribution of X is:

x 0 1 2 3 4 5

P(X = x) 0.12 0.26 0.33 0.19 0.07 0.03

a) Find the mean number of days he is late to work per week.b) Find the standard deviation.c) His boss decides to fine him £25 if he is late once or twice

in a week and £40 if he is late more than twice in a week. Find his expected weekly fine.

d) Find the probability that he is late exactly once in a two

Variance and standard deviation

week period.

Page 25: © Boardworks Ltd 20051 of 39 © Boardworks Ltd 2005 1 of 39 AS-Level Maths: Statistics 1 for Edexcel S1.5 Discrete random variables This icon indicates.

© Boardworks Ltd 200525 of 39

a)

Variance and standard deviation

[ ] ( . ) ( . ) ... ( . .)E 0 0 12 1 0 26 5 0 03 1 92X

[ ] ( . ) ( . ) ... ( . ) .2 2 2 2E 0 0 12 1 0 26 5 0 03 5 16X

[ ] . . .2Var 5 16 1 92 1 4736X

b)

. .1 21 1 4736 (3 s.f.)

Therefore,

So,

x 0 1 2 3 4 5

P(X = x) 0.12 0.26 0.33 0.19 0.07 0.03

Page 26: © Boardworks Ltd 20051 of 39 © Boardworks Ltd 2005 1 of 39 AS-Level Maths: Statistics 1 for Edexcel S1.5 Discrete random variables This icon indicates.

© Boardworks Ltd 200526 of 39

y 0 25 40

P(Y = y) 0.12 0.59 0.29

c) Let Y be the random variable representing his weekly fine.

Variance and standard deviation

[ ] ( . ) ( . ) ( . ) .E 0 0 12 25 0 59 40 0 29 26 35Y

So, his expected weekly fine is £26.35.

d) P(late exactly once in a 2 week period) = ( . . ) ( . .. )0 12 0 26 0 2 0 06212 46 0

Not late at all in

first week

Late once in second

week

Late once in first week

Not late at all in second

week

Page 27: © Boardworks Ltd 20051 of 39 © Boardworks Ltd 2005 1 of 39 AS-Level Maths: Statistics 1 for Edexcel S1.5 Discrete random variables This icon indicates.

© Boardworks Ltd 200527 of 39

Examination-style question: Janet takes part in a game at a school fete based on hoop-la. On each turn at the game she throws up to three hoops. She wins a sweet each time she throws a hoop over a peg. However, the turn is over as soon as a hoop misses a peg, or once she has thrown all three hoops.

On each throw, the probability of Janet getting the hoop over a peg is 0.4. Let X represent the number of sweets she wins on one turn at the game.

Variance and standard deviation

a) Show that P(X = 2) = 0.096, and find P(X = 0), P(X = 1) and P(X = 3).

b) Find the mean and standard deviation of X.

Page 28: © Boardworks Ltd 20051 of 39 © Boardworks Ltd 2005 1 of 39 AS-Level Maths: Statistics 1 for Edexcel S1.5 Discrete random variables This icon indicates.

© Boardworks Ltd 200528 of 39

a) P(X = 2) = P(succeeds on first two goes, but misses on 3rd)

= 0.4 × 0.4 × 0.6 = 0.096

P(X = 0) = P(misses on 1st go) = 0.6

P(X = 1) = P(succeeds on 1st go, but then misses)

= 0.4 × 0.6 = 0.24

P(X = 3) = P(succeeds on all 3 tries) = 0.43 = 0.064

Variance and standard deviation

x 0 1 2 3

P(X = x) 0.6 0.24 0.096 0.064

[ ] ( . ) ( . ) ( . ) (

.

. )E 0 0 6 1 0 24 2 0 096 3 0 064

0 624

X

b) The probability distribution of X is as follows:

Page 29: © Boardworks Ltd 20051 of 39 © Boardworks Ltd 2005 1 of 39 AS-Level Maths: Statistics 1 for Edexcel S1.5 Discrete random variables This icon indicates.

© Boardworks Ltd 200529 of 39

Variance and standard deviation

x 0 1 2 3

P(X = x) 0.6 0.24 0.096 0.064

[ ] ( . ) ( . ) ( . ) ( . )

.

2 2 2 2 2E 0 0 6 1 0 24 2 0 096 3 0 064

1 2

X

Using Var(X) = E[X2] – μ2, we get:

[ ] . . 2Var 1 2 0 624 0.810624X

So, σ = 0.900 (to 3 s.f.)

Page 30: © Boardworks Ltd 20051 of 39 © Boardworks Ltd 2005 1 of 39 AS-Level Maths: Statistics 1 for Edexcel S1.5 Discrete random variables This icon indicates.

© Boardworks Ltd 200530 of 39

Co

nte

nts

© Boardworks Ltd 200530 of 39

Introduction to discrete random variables

Cumulative distribution functions

Expectation

Variance and standard deviation for random variables

Discrete uniform distribution

Expectation algebra – some key results

Discrete uniform distribution

Page 31: © Boardworks Ltd 20051 of 39 © Boardworks Ltd 2005 1 of 39 AS-Level Maths: Statistics 1 for Edexcel S1.5 Discrete random variables This icon indicates.

© Boardworks Ltd 200531 of 39

A discrete uniform distribution arises when a random variable can take a finite number of equally likely possible values. So, if X has a discrete uniform distribution taking the values x1, …, xn, its probability distribution will be:

x x1 x2 … xn

P(X = x) …

X is the score obtained when a fair six-sided dice is thrown;

X is the number on the first ball generated by the National Lottery machine;

X is the value of the digit generated by a computer’s

1n

1n

1n

Discrete uniform distribution

Examples of random variables that have discrete uniform distributions are:

random digit generating program.

Page 32: © Boardworks Ltd 20051 of 39 © Boardworks Ltd 2005 1 of 39 AS-Level Maths: Statistics 1 for Edexcel S1.5 Discrete random variables This icon indicates.

© Boardworks Ltd 200532 of 39

An important special case is that of a discrete uniform distribution taking the values 1, 2, …, n:

This uniform distribution is sometimes denoted by U(1, n).

The mean and variance of this particular distribution are:

E[X] = and Var[X] =

x 1 2 … n

P(X = x) …

1

2

n 2 1

12

n

Discrete uniform distribution

1n

1n

1n

Page 33: © Boardworks Ltd 20051 of 39 © Boardworks Ltd 2005 1 of 39 AS-Level Maths: Statistics 1 for Edexcel S1.5 Discrete random variables This icon indicates.

© Boardworks Ltd 200533 of 39

Discrete uniform distribution

.4 1

2 52

24 1 5

12 4

X therefore has a uniform distribution, X ~ U(1, 4).

Example: A tetrahedral dice has its faces numbered 1, 2, 3 and 4. X is the score obtained when the dice is rolled.

and Var[X] =

So, E[X] =

Page 34: © Boardworks Ltd 20051 of 39 © Boardworks Ltd 2005 1 of 39 AS-Level Maths: Statistics 1 for Edexcel S1.5 Discrete random variables This icon indicates.

© Boardworks Ltd 200534 of 39

Co

nte

nts

© Boardworks Ltd 200534 of 39

Introduction to discrete random variables

Cumulative distribution functions

Expectation

Variance and standard deviation for random variables

Discrete uniform distribution

Expectation algebra – some key results

Expectation algebra

Page 35: © Boardworks Ltd 20051 of 39 © Boardworks Ltd 2005 1 of 39 AS-Level Maths: Statistics 1 for Edexcel S1.5 Discrete random variables This icon indicates.

© Boardworks Ltd 200535 of 39

There are two key results that relate to the expectation and variance of a linear function of a random variable, X:

Result 1: E[aX + b] = aE[X] + b

Result 2: Var[aX + b] = a²Var[X]

Proof of result 1:

Expectation algebra

[ ] ( )

]

( )

[E

E i i i i ii i

i i i i i ii i i i

aX b ax b p ax p bp

ax p bp

a X b

a x p b p

Page 36: © Boardworks Ltd 20051 of 39 © Boardworks Ltd 2005 1 of 39 AS-Level Maths: Statistics 1 for Edexcel S1.5 Discrete random variables This icon indicates.

© Boardworks Ltd 200536 of 39

Proof of result 2:

Expectation algebra

[ ] ( [ ])

( )

( ) (

[

)

]2

2

2

2 2 2

Var

Var E E

E

E E

aX b aX b aX b

aX b a b

aX a a X

a X

where μ = E[X]

Result 2: Var[aX + b] = a²Var[X]

[ ] ( )2Var E[ ]X X Remember:

Page 37: © Boardworks Ltd 20051 of 39 © Boardworks Ltd 2005 1 of 39 AS-Level Maths: Statistics 1 for Edexcel S1.5 Discrete random variables This icon indicates.

© Boardworks Ltd 200537 of 39

Example: A random variable Y has mean 5 and variance 16.

Find the mean and the variance of:

Expectation algebra

a) E[2Y] = 2E[Y] = 2 × 5 = 10

Var[2Y] = 4Var[Y] = 4 × 16 = 64

b) E[3Y – 8] = 3E[Y] – 8 = 3 × 5 – 8 = 7

Var[3Y – 8] = 9Var[Y] = 9 × 16 = 144

a) 2Y

b) 3Y – 8

Page 38: © Boardworks Ltd 20051 of 39 © Boardworks Ltd 2005 1 of 39 AS-Level Maths: Statistics 1 for Edexcel S1.5 Discrete random variables This icon indicates.

© Boardworks Ltd 200538 of 39

Examination-style question: A random variable X has probability distribution given by:

P(X = x) = for x = 1, 2, 3

a) The probability distribution for X can be shown in a table:

x 1 2 3

P(X = x) c

The sum of the probabilities must be 1, so

Expectation algebra

c

x

2

c3

c

561 1c

6

11

a) Find c.

b) Find Var[X].

c) Find Var[6X + 2].

i.e. c =

Page 39: © Boardworks Ltd 20051 of 39 © Boardworks Ltd 2005 1 of 39 AS-Level Maths: Statistics 1 for Edexcel S1.5 Discrete random variables This icon indicates.

© Boardworks Ltd 200539 of 39

b) The probability distribution for X therefore, is:

Expectation algebra

[ ] 6 3 18211 11 11 11E 1 2 3X

[ ]2 2 2 26 3 36211 11 11 11E 1 2 3X

] .[236 18

11 11Var 0 595X

Using

and

we get (to 3 s.f.)

c) Var[6X + 2] = 36 × 0.595 = 21.4 (to 3 s.f.)

x 1 2 3

P(X = x) 3

11

6

11

2

11