Вы находитесь на странице: 1из 95

# MA1061Probability

Lecture 9
Sibylle Schroll
University of Leicester

MA1061Lecture 9

1 / 25

1 / 25

Plan

## In the last lecture we talked about

Random variables;

MA1061Lecture 9

2 / 25

2 / 25

Plan

## In the last lecture we talked about

Random variables;
Distribution of random variables.

MA1061Lecture 9

2 / 25

2 / 25

Plan

## In the last lecture we talked about

Random variables;
Distribution of random variables.
Distribution functions;

MA1061Lecture 9

2 / 25

2 / 25

Plan

## In the last lecture we talked about

Random variables;
Distribution of random variables.
Distribution functions;
A few examples of random variables.

MA1061Lecture 9

2 / 25

2 / 25

## Distribution of a random variable

Recall that
A random variable X is a function X : R.

MA1061Lecture 9

3 / 25

3 / 25

## Distribution of a random variable

Recall that
A random variable X is a function X : R.
The probability distribution of X is a new probability PX defined
on the range (RX , R) such that for B R
P(X B) = PX (B) = P(X1 (B)) = P({ : X() B}).

MA1061Lecture 9

3 / 25

3 / 25

## Distribution of a random variable

Recall that
A random variable X is a function X : R.
The probability distribution of X is a new probability PX defined
on the range (RX , R) such that for B R
P(X B) = PX (B) = P(X1 (B)) = P({ : X() B}).
The probability structure of a finite random variable X is
completely specified by its probability mass function
PX () : RX [0, 1],
X
PX (x) = 1.
xRX

MA1061Lecture 9

3 / 25

3 / 25

## Probability mass and distribution functions

Distribution function

MA1061Lecture 9

4 / 25

4 / 25

## Probability mass and distribution functions

Distribution function

## Also recall cumulative distribution functions:

Definition (Distribution function)
Let x R. The function
FX (x) = P{ : X() 6 x},
is called the (cumulative) distribution function of the random variable
X.

MA1061Lecture 9

4 / 25

4 / 25

1
FX () = 0;

MA1061Lecture 9

5 / 25

5 / 25

1
FX () = 0;
2
FX (+) = 1;

MA1061Lecture 9

5 / 25

5 / 25

## And some properties:

1
FX () = 0;
2
FX (+) = 1;
3
FX (x) is right-continuous; ie limh0 F(x + h) = F(x).

MA1061Lecture 9

5 / 25

5 / 25

## And some properties:

1
FX () = 0;
2
FX (+) = 1;
3
FX (x) is right-continuous; ie limh0 F(x + h) = F(x).
4
FX is non-decreasing.

MA1061Lecture 9

5 / 25

5 / 25

## And some properties:

1
FX () = 0;
2
FX (+) = 1;
3
FX (x) is right-continuous; ie limh0 F(x + h) = F(x).
4
FX is non-decreasing.
5
FX is piecewise constant.

MA1061Lecture 9

5 / 25

5 / 25

MA1061Lecture 9

6 / 25

6 / 25

## Random variables arise in many different settings;

Very different experiments can lead naturally to essentially the
same random variable;

MA1061Lecture 9

6 / 25

6 / 25

## Random variables arise in many different settings;

Very different experiments can lead naturally to essentially the
same random variable;
The particular random variablesdistributions we shall learn
about in the next few lectures appear in a wide variety of
settings.

MA1061Lecture 9

6 / 25

6 / 25

## Random variables arise in many different settings;

Very different experiments can lead naturally to essentially the
same random variable;
The particular random variablesdistributions we shall learn
about in the next few lectures appear in a wide variety of
settings.
We shall see certain patterns arising.

MA1061Lecture 9

6 / 25

6 / 25

## Particular random variables

Example

Example
In human populations, the probability of male and female are
approximately equal:
1
P(male) = P(female) = .
2

MA1061Lecture 9

7 / 25

7 / 25

## Particular random variables

Example

Example
In human populations, the probability of male and female are
approximately equal:
1
P(male) = P(female) = .
2
Consider now a family with three kids;

MA1061Lecture 9

7 / 25

7 / 25

## Particular random variables

Example

Example
In human populations, the probability of male and female are
approximately equal:
1
P(male) = P(female) = .
2
Consider now a family with three kids;
Let X count the number of male children.

MA1061Lecture 9

7 / 25

7 / 25

## Particular random variables

Example

Example
In human populations, the probability of male and female are
approximately equal:
1
P(male) = P(female) = .
2
Consider now a family with three kids;
Let X count the number of male children.
What is the distribution of X?

MA1061Lecture 9

7 / 25

7 / 25

## Particular random variables

Example continued
x
PX (x)

1
8

3
8

3
8

1
8

MA1061Lecture 9

8 / 25

8 / 25

## Particular random variables

Example continued
x
PX (x)

1
8

3
8

3
8

1
8

## Compare to the distribution of the number of heads when you

toss three coins.

MA1061Lecture 9

8 / 25

8 / 25

## Particular random variables

Example continued
x
PX (x)

1
8

3
8

3
8

1
8

## Compare to the distribution of the number of heads when you

toss three coins.
Different settings but same distribution.

MA1061Lecture 9

8 / 25

8 / 25

## Particular random variables

Example continued
x
PX (x)

1
8

3
8

3
8

1
8

## Compare to the distribution of the number of heads when you

toss three coins.
Different settings but same distribution.
In both experiments independent trials of a random variable with
two possible values are performed.eg

MA1061Lecture 9

8 / 25

8 / 25

## Particular random variables

Example continued
x
PX (x)

1
8

3
8

3
8

1
8

## Compare to the distribution of the number of heads when you

toss three coins.
Different settings but same distribution.
In both experiments independent trials of a random variable with
two possible values are performed.eg
Girl or Boy?

MA1061Lecture 9

8 / 25

8 / 25

## Particular random variables

Example continued
x
PX (x)

1
8

3
8

3
8

1
8

## Compare to the distribution of the number of heads when you

toss three coins.
Different settings but same distribution.
In both experiments independent trials of a random variable with
two possible values are performed.eg
Girl or Boy?

MA1061Lecture 9

8 / 25

8 / 25

## Particular random variables

Example continued
x
PX (x)

1
8

3
8

3
8

1
8

## Compare to the distribution of the number of heads when you

toss three coins.
Different settings but same distribution.
In both experiments independent trials of a random variable with
two possible values are performed.eg
Girl or Boy?
0 or 1? Success or Failure?

MA1061Lecture 9

8 / 25

8 / 25

MA1061Lecture 9

9 / 25

9 / 25

## Different experiments lead to the same random variables;

natural to study a random variable without considering the
underlying experiment;

MA1061Lecture 9

9 / 25

9 / 25

## Different experiments lead to the same random variables;

natural to study a random variable without considering the
underlying experiment;
We may study random variables without specifying the
probability space (, A, P).

MA1061Lecture 9

9 / 25

9 / 25

## Different experiments lead to the same random variables;

natural to study a random variable without considering the
underlying experiment;
We may study random variables without specifying the
probability space (, A, P).
Given a random variable X we are only interested in the
probability space (RX , R, PX ).

MA1061Lecture 9

9 / 25

9 / 25

## Different experiments lead to the same random variables;

natural to study a random variable without considering the
underlying experiment;
We may study random variables without specifying the
probability space (, A, P).
Given a random variable X we are only interested in the
probability space (RX , R, PX ).
We are interested only in the probability distribution or
distribution function.

MA1061Lecture 9

9 / 25

9 / 25

## In many of the examples we considered the n possible outcomes

are equally likely.

MA1061Lecture 9

10 / 25

10 / 25

## In many of the examples we considered the n possible outcomes

are equally likely.
Definition (Discrete Uniform Distribution)
Let X take each of the values {x1 , . . . , xn } with the same probability
1
.
n
Then we say that X is uniformly distributed on the set {x1 , . . . , xn }.
The distribution of X is called the discrete uniform distribution.

MA1061Lecture 9

10 / 25

10 / 25

## In many of the examples we considered the n possible outcomes

are equally likely.
Definition (Discrete Uniform Distribution)
Let X take each of the values {x1 , . . . , xn } with the same probability
1
.
n
Then we say that X is uniformly distributed on the set {x1 , . . . , xn }.
The distribution of X is called the discrete uniform distribution.
e.g. the distribution of the number showing on a fair die.

MA1061Lecture 9

10 / 25

10 / 25

## Definition (Bernoulli random variable)

A random variable X that takes the values 1 and 0 with probabilities
p, and q = 1 p resp. is called a Bernoulli random variable.

MA1061Lecture 9

11 / 25

11 / 25

## Definition (Bernoulli random variable)

A random variable X that takes the values 1 and 0 with probabilities
p, and q = 1 p resp. is called a Bernoulli random variable.
Any experiment with two possible outcomes can be modelled by
a Bernoulli variable. eg the sex of a child, the outcome of a toss
of a coin.

MA1061Lecture 9

11 / 25

11 / 25

## Definition (Bernoulli random variable)

A random variable X that takes the values 1 and 0 with probabilities
p, and q = 1 p resp. is called a Bernoulli random variable.
Any experiment with two possible outcomes can be modelled by
a Bernoulli variable. eg the sex of a child, the outcome of a toss
of a coin.
How is a Bernoulli random variable related to an indicator?

MA1061Lecture 9

11 / 25

11 / 25

MA1061Lecture 9

12 / 25

12 / 25

## Let A , in some probability space, such that P(A) = p.

Consider X = 1A .

MA1061Lecture 9

12 / 25

12 / 25

## Let A , in some probability space, such that P(A) = p.

Consider X = 1A .
Then P(X = 1) = p, and P(X = 0) = 1 p.

MA1061Lecture 9

12 / 25

12 / 25

## Let A , in some probability space, such that P(A) = p.

Consider X = 1A .
Then P(X = 1) = p, and P(X = 0) = 1 p.
Hence indicators are equivalent to Bernoulli variables.

MA1061Lecture 9

12 / 25

12 / 25

## Bernoulli trials and binomial random

variable/binomial distribution

## Definition (Sequence of trials)

A sequence of trials or experiments for which

MA1061Lecture 9

13 / 25

13 / 25

## Bernoulli trials and binomial random

variable/binomial distribution

## Definition (Sequence of trials)

A sequence of trials or experiments for which
(i) the outcomes of the trials are independent;

MA1061Lecture 9

13 / 25

13 / 25

## Bernoulli trials and binomial random

variable/binomial distribution

## Definition (Sequence of trials)

A sequence of trials or experiments for which
(i) the outcomes of the trials are independent;
(ii) outcomes are of two types (success, failure); and

MA1061Lecture 9

13 / 25

13 / 25

## Bernoulli trials and binomial random

variable/binomial distribution

## Definition (Sequence of trials)

A sequence of trials or experiments for which
(i) the outcomes of the trials are independent;
(ii) outcomes are of two types (success, failure); and
(iii) the probabilities for the two types of outcomes remain the same
for all the trials,

MA1061Lecture 9

13 / 25

13 / 25

## Bernoulli trials and binomial random

variable/binomial distribution

## Definition (Sequence of trials)

A sequence of trials or experiments for which
(i) the outcomes of the trials are independent;
(ii) outcomes are of two types (success, failure); and
(iii) the probabilities for the two types of outcomes remain the same
for all the trials,
is called an sequence of Bernoulli trials.

MA1061Lecture 9

13 / 25

13 / 25

## Sequence of random variables

A sequence of trials is essentially a sequence of independent
random variables X1 , X2 , . . . , Xn .

MA1061Lecture 9

14 / 25

14 / 25

## Sequence of random variables

A sequence of trials is essentially a sequence of independent
random variables X1 , X2 , . . . , Xn .
Each random variable must have the same distribution.

MA1061Lecture 9

14 / 25

14 / 25

## Sequence of random variables

A sequence of trials is essentially a sequence of independent
random variables X1 , X2 , . . . , Xn .
Each random variable must have the same distribution.
In the case of Bernoulli trials:
P(X1 = 1) = = P(Xn = 1) = p,
P(X1 = 0) = = P(Xn = 0) = q = 1 p.

MA1061Lecture 9

14 / 25

14 / 25

## Sequence of random variables

A sequence of trials is essentially a sequence of independent
random variables X1 , X2 , . . . , Xn .
Each random variable must have the same distribution.
In the case of Bernoulli trials:
P(X1 = 1) = = P(Xn = 1) = p,
P(X1 = 0) = = P(Xn = 0) = q = 1 p.
Plenty of examples. BUT we still need to define what
independence means in this situation.

MA1061Lecture 9

14 / 25

14 / 25

## Suppose now that the events A1 , . . . , An are mutually

independent, and P(Ai ) = p.

MA1061Lecture 9

15 / 25

15 / 25

## Suppose now that the events A1 , . . . , An are mutually

independent, and P(Ai ) = p.
Can you think of a way to define independent Bernoulli
variables?

MA1061Lecture 9

15 / 25

15 / 25

## Suppose now that the events A1 , . . . , An are mutually

independent, and P(Ai ) = p.
Can you think of a way to define independent Bernoulli
variables?
Xi = 1Ai , for i = 1, . . . , n.

MA1061Lecture 9

15 / 25

15 / 25

## When we have n Bernoulli trials the sample space is

= { : = (a1 , . . . , an ), ai = 0 or 1}.

MA1061Lecture 9

16 / 25

16 / 25

## When we have n Bernoulli trials the sample space is

= { : = (a1 , . . . , an ), ai = 0 or 1}.
By independence of trials the probability of an elementary event
in which there are precisely k successes and n k
failures is just
k nk

P() = P((a1 , . . . , an )) = p q

k=

n
X

ai .

i=1

MA1061Lecture 9

16 / 25

16 / 25

## When we have n Bernoulli trials the sample space is

= { : = (a1 , . . . , an ), ai = 0 or 1}.
By independence of trials the probability of an elementary event
in which there are precisely k successes and n k
failures is just
k nk

P() = P((a1 , . . . , an )) = p q

k=

n
X

ai .

i=1

MA1061Lecture 9

16 / 25

16 / 25

## When we have n Bernoulli trials the sample space is

= { : = (a1 , . . . , an ), ai = 0 or 1}.
By independence of trials the probability of an elementary event
in which there are precisely k successes and n k
failures is just
k nk

P() = P((a1 , . . . , an )) = p q

k=

n
X

ai .

i=1

## How many of these are there?

Number of orderings of k 1s and (n k) 0s
Cn
k

MA1061Lecture 9

16 / 25

16 / 25

## Towards the binomial distribution

On the probability space we just constructed define the variable
X : R by

MA1061Lecture 9

17 / 25

17 / 25

## Towards the binomial distribution

On the probability space we just constructed define the variable
X : R by
X() = X((a1 , . . . , an )) =

n
X

ai = number of successes.

i=1

MA1061Lecture 9

17 / 25

17 / 25

## Towards the binomial distribution

On the probability space we just constructed define the variable
X : R by
X() = X((a1 , . . . , an )) =

n
X

ai = number of successes.

i=1

then X() = k.

MA1061Lecture 9

17 / 25

17 / 25

## Towards the binomial distribution

On the probability space we just constructed define the variable
X : R by
X() = X((a1 , . . . , an )) =

n
X

ai = number of successes.

i=1

## Thus if in the elementary event there are exactly k successes,

then X() = k.
We want to find the (probability) distribution of X. Range?
.

MA1061Lecture 9

17 / 25

17 / 25

## Towards the binomial distribution

On the probability space we just constructed define the variable
X : R by
X() = X((a1 , . . . , an )) =

n
X

ai = number of successes.

i=1

## Thus if in the elementary event there are exactly k successes,

then X() = k.
We want to find the (probability) distribution of X. Range?
{0, 1, . . . , n}.

MA1061Lecture 9

17 / 25

17 / 25

## Towards the binomial distribution

On the probability space we just constructed define the variable
X : R by
X() = X((a1 , . . . , an )) =

n
X

ai = number of successes.

i=1

## Thus if in the elementary event there are exactly k successes,

then X() = k.
We want to find the (probability) distribution of X. Range?
{0, 1, . . . , n}.
Let k = 0, . . . , n. What is PX (k)?
Sibylle Schroll (University of Leicester)

MA1061Lecture 9

17 / 25

17 / 25

## Towards the binomial distribution

By definition

PX (k) = P { : X() = k} .

MA1061Lecture 9

18 / 25

18 / 25

## Towards the binomial distribution

By definition

PX (k) = P { : X() = k} .
Let Bk = { : X() = k}.

MA1061Lecture 9

18 / 25

18 / 25

## Towards the binomial distribution

By definition

PX (k) = P { : X() = k} .
Let Bk = { : X() = k}.
Obviously Bk consists of the binary sequences of length n with
exactly k 1s and n k 0s.

MA1061Lecture 9

18 / 25

18 / 25

## Towards the binomial distribution

By definition

PX (k) = P { : X() = k} .
Let Bk = { : X() = k}.
Obviously Bk consists of the binary sequences of length n with
exactly k 1s and n k 0s.
We just saw that there are Cn
k of these.

MA1061Lecture 9

18 / 25

18 / 25

## Towards the binomial distribution

If then P() = P((a1 , . . . , an )) = pk qnk .

MA1061Lecture 9

19 / 25

19 / 25

## Towards the binomial distribution

If then P() = P((a1 , . . . , an )) = pk qnk .
Therefore
k nk
.
P({X = k}) = PX (k) = Cn
kp q

MA1061Lecture 9

19 / 25

19 / 25

## Towards the binomial distribution

If then P() = P((a1 , . . . , an )) = pk qnk .
Therefore
k nk
.
P({X = k}) = PX (k) = Cn
kp q
The variable X is completely characterized by its probability
distribution
k nk
PX (k) = Cn
,
kp q

## Sibylle Schroll (University of Leicester)

MA1061Lecture 9

k = 0, . . . , n.

19 / 25

19 / 25

## Towards the binomial distribution

If then P() = P((a1 , . . . , an )) = pk qnk .
Therefore
k nk
.
P({X = k}) = PX (k) = Cn
kp q
The variable X is completely characterized by its probability
distribution
k nk
PX (k) = Cn
,
kp q

k = 0, . . . , n.

MA1061Lecture 9

19 / 25

19 / 25

## Towards the binomial distribution

If then P() = P((a1 , . . . , an )) = pk qnk .
Therefore
k nk
.
P({X = k}) = PX (k) = Cn
kp q
The variable X is completely characterized by its probability
distribution
k nk
PX (k) = Cn
,
kp q

k = 0, . . . , n.

## The above distribution is known as the binomial distribution.

We write X Bi(n, p).

MA1061Lecture 9

19 / 25

19 / 25

## Definition (Binomial random variable)

A random variable X such that
k
nk
P(X = k) = Cn
,
k p (1 p)

## for some p [0, 1], and k = 0, 1, . . . , n, is called a Binomial random

variable with parameters n, p.
The distribution of X defined as above is called the Binomial
distribution with parameters n, p.

MA1061Lecture 9

20 / 25

20 / 25

MA1061Lecture 9

21 / 25

21 / 25

## If X Bi(n, p), then X counts the number of successes in n

independent experiments each with probability of success p.

MA1061Lecture 9

21 / 25

21 / 25

## If X Bi(n, p), then X counts the number of successes in n

independent experiments each with probability of success p.
Its distribution PX (k) gives the probability of having k successes
in n independent trials.

MA1061Lecture 9

21 / 25

21 / 25

## Particular random variables

Theorem
Let X1 , X2 , ..., Xn be n independent Bernoulli random variables of
parameter p. Then
X = X1 + X2 + + Xn
has a binomial distribution. In fact
X Bi(n, p.)

MA1061Lecture 9

22 / 25

22 / 25

## Particular random variables

Example
Suppose a family has three children and suppose that it is equally
likely to have boy or girl.
If X is the number of male children, what is the probability
distribution of X?
Using this distribution, calculate the probability that the family has 0,
1, 2 or 3 boys.

MA1061Lecture 9

23 / 25

23 / 25

## Particular random variables

Example
Suppose 10 % of items produced in a factory are defective. Choose 3
items at random. What is the probability that

MA1061Lecture 9

24 / 25

24 / 25

## Particular random variables

Example
Suppose 10 % of items produced in a factory are defective. Choose 3
items at random. What is the probability that
(a) all are defective

MA1061Lecture 9

24 / 25

24 / 25

## Particular random variables

Example
Suppose 10 % of items produced in a factory are defective. Choose 3
items at random. What is the probability that
(a) all are defective
(b) 2 are defective

MA1061Lecture 9

24 / 25

24 / 25

## Particular random variables

Example
Suppose 10 % of items produced in a factory are defective. Choose 3
items at random. What is the probability that
(a) all are defective
(b) 2 are defective
(c) none are defective?

MA1061Lecture 9

24 / 25

24 / 25

## Particular random variables

Example
Suppose 10 % of items produced in a factory are defective. Choose 3
items at random. What is the probability that
(a) all are defective
(b) 2 are defective
(c) none are defective?
Use the binomial distribution to answer the question.

MA1061Lecture 9

24 / 25

24 / 25

## Particular random variables

Example
Suppose 10 % of items produced in a factory are defective. Choose 3
items at random. What is the probability that
(a) all are defective
(b) 2 are defective
(c) none are defective?
Use the binomial distribution to answer the question.
Could you answer the question without using the binomial
distribution?

MA1061Lecture 9

24 / 25

24 / 25

## Particular random variables

Example
Suppose 10 % of items produced in a factory are defective. Choose 3
items at random. What is the probability that
(a) all are defective
(b) 2 are defective
(c) none are defective?
Use the binomial distribution to answer the question.
Could you answer the question without using the binomial
distribution?
X Bi(3, 0.1)

MA1061Lecture 9

24 / 25

24 / 25

## Particular random variables

Example
Suppose 10 % of items produced in a factory are defective. Choose 3
items at random. What is the probability that
(a) all are defective
(b) 2 are defective
(c) none are defective?
Use the binomial distribution to answer the question.
Could you answer the question without using the binomial
distribution?
X Bi(3, 0.1)
Hence P(X = 3) = C33 (0.1)3 (0.9)0 = 0.001

MA1061Lecture 9

24 / 25

24 / 25

## Particular random variables

Example
Suppose 10 % of items produced in a factory are defective. Choose 3
items at random. What is the probability that
(a) all are defective
(b) 2 are defective
(c) none are defective?
Use the binomial distribution to answer the question.
Could you answer the question without using the binomial
distribution?
X Bi(3, 0.1)
Hence P(X = 3) = C33 (0.1)3 (0.9)0 = 0.001
P(X = 2) = C32 (0.1)2 (0.9)1 = 3x0.01x0.9 = 0.027

MA1061Lecture 9

24 / 25

24 / 25

## Particular random variables

Example
Suppose 10 % of items produced in a factory are defective. Choose 3
items at random. What is the probability that
(a) all are defective
(b) 2 are defective
(c) none are defective?
Use the binomial distribution to answer the question.
Could you answer the question without using the binomial
distribution?
X Bi(3, 0.1)
Hence P(X = 3) = C33 (0.1)3 (0.9)0 = 0.001
P(X = 2) = C32 (0.1)2 (0.9)1 = 3x0.01x0.9 = 0.027
P(X = 0) = C30 (0.1)0 (0.9)3 = 0.729

MA1061Lecture 9

24 / 25

24 / 25

Whats next?

random vectors;

MA1061Lecture 9

25 / 25

25 / 25

## Particular random variables

Whats next?

random vectors;
independence of random variables;

MA1061Lecture 9

25 / 25

25 / 25

## Particular random variables

Whats next?

random vectors;
independence of random variables;
functions of random variables.

MA1061Lecture 9

25 / 25

25 / 25