Probability Random Variables Preparatory Notes

Содержание

Слайд 2

Overview Basic Probability Discrete Random Variables Continuous Random Variables Concepts Laws

Overview

Basic Probability

Discrete Random Variables

Continuous Random Variables

Concepts
Laws and Notation
Conditional Probability
Total Law

of Probability

Definition
Probability Mass Function
Mean and Variance
Conditional Expectation
Poisson Distribution

Definition
Probability Density Function
Probability as an Integral
Mean and Variance
Conditional Expectation
Exponential Distribution
Normal Distribution

Слайд 3

BASIC PROBABILITY CONCEPTS: ‘Experiments’ and ‘Events’ Experiment: an action whose outcome

BASIC PROBABILITY CONCEPTS: ‘Experiments’ and ‘Events’
Experiment: an action whose outcome

is uncertain (roll a die)
Sample Space: set of all possible outcomes of an experiment (S = {1, 2, 3, 4, 5, 6})
Event: a subset of outcomes that is of interest to us (e.g. event 1 = even number, event 2 = higher than 4, event 3 = throw a 2, etc)
Probability: measure of how likely an event is to occur (between 0 and 1)
Слайд 4

How to measure probability Probability: measure of how likely an event

How to measure probability

Probability: measure of how likely an event is

to occur (between 0 and 1)

Classical Definition
- Calculate, assuming events equally likely
Relative Frequency Approach
- Doing an experiment, using historical data
Subjective/Bayesian Probability
- Trusting instinct, using judgement

Слайд 5

EX: As part of a survey on whether to ban smoking

EX: As part of a survey on whether to ban smoking

inside parliament, 1000
politicians were interviewed, 600 of which were from the Yellow Party
and 400 were from the Blue party. Results of the survey are as follows:

LAWS & NOTATION:

Слайд 6

Probability that a person chosen randomly (i.e. everyone has an equal

Probability that a person chosen randomly (i.e. everyone has an equal

chance of selection) from the survey is a member of the Yellow Party ( Y ):
P(Y) = 600/1000 = 0.6
Probability that a person chosen randomly from the survey would ban smoking ( Ban ):
P(Ban) = 500/1000 = 0.5

‘Basic’ Events

Слайд 7

Probability that a person chosen randomly from the survey is a

Probability that a person chosen randomly from the survey is a

member
of the Yellow Party ( Y ) and would ban smoking ( Ban ), which is denoted by:

‘Combined’ Events 1
(Intersection of events)

Probability that a person chosen randomly from the survey would ban smoking ( Ban) and is a member of the Yellow Party ( Y ), denoted by:

Clearly the intersection of events does not depend on their order of listing.

Слайд 8

Probability that a person chosen is either from the Yellow Party

Probability that a person chosen is either from the Yellow Party

( Y )
or would ban smoking ( Ban ):

‘Combined’ Events 2
(Union of events)

So here we have seen that:

This is an example of the Addition Law for Probabilities, see next slide …………….

Слайд 9

Addition Law for Probabilities (in general): A special case is when

Addition Law for Probabilities (in general):

A special case is when Events

A and B are mutually exclusive , i.e. they cannot both happen, in which case the addition law simplifies to:
Слайд 10

The Conditional Probability that a randomly chosen person would ban smoking

The Conditional Probability that a randomly chosen person would ban smoking

( Ban ) given that he/she is from the Yellow Party ( Y ):

‘Combined’ Events 3
(Conditional events)

i.e.:

This is an example of the Multiplication Law for Probabilities, see next slide …………….

Or by simple rearrangement:

Слайд 11

Multiplication Law for Probabilities (in general) or A special case is

Multiplication Law for Probabilities (in general)

or

A special case is when Events

A and B are independent, i.e. the occurrence of A has no influence on the probability of B [and vice versa)]
i.e. P(B/A) = P(B) [and P(A/B)=P(A)]
in which case the multiplication law simplifies to:
NOTE: This notion of independence can be extended to more than 2 events.
Слайд 12

Law of Total Probability EX: The results of the survey on

Law of Total Probability

EX: The results of the survey on whether

to ban smoking inside parliament
could be reported as:
P(Y) = 0.6, P(Ban/Y) = 5/12
P(B) = 0.4 , P(Ban/B) = 5/8
Now P(Ban) = P(Ban∩Y) + P(Ban∩B) [as Ban∩Y and Ban∩B are mutually exclusive & the only two ways that Ban can occur]
= P(Ban/Y) x P(Y) + P(Ban/B) x P(B) [by multiplication rule]
= 5/12 x 0.6 + 5/8 x 0.4
= 0.25 + 0.25 = 0.5

This is an example of the Law of Total Probability, see next slide …………….

Слайд 13

Law of Total Probability in general Suppose events A1, A2, A3,

Law of Total Probability in general

Suppose events A1, A2, A3, …

An are mutually exclusive and complete (i.e. one of them must occur), then the probability of another event (B) can be calculated by weighting the conditional probabilities of B, i.e:
P(B) = P(B/A1) x P(A1) + P(B/A2) x P(A2) + …P(B/An) x P(An)
See another example on next slide …..
Слайд 14

Tree Diagrams also help think about probabilities In a factory, a

Tree Diagrams also help think about probabilities

In a factory, a brand

of chocolates is packed into boxes on four production lines A, B, C, D. Records show that a small percentage of boxes are not packed properly for sale as follows

What is the probability that a box chosen at random from the factory’s output is faulty?

Слайд 15

Discrete Random Variables A random variable is a numerical description of

Discrete Random Variables

A random variable is a numerical description of the

outcome of an experiment.
When the values are ‘discrete’, (e.g. value shown when die is thrown, first number drawn in lottery, daily number of patients attending A&E in Lancaster), the random variable is discrete.
{ For Later ***When the values are ‘continuous’ , (e.g. height of randomly selected student, temperature in Lancaster, time between patients arriving at A&E), the random variable is continuous.}
Слайд 16

Probability Mass Function (pmf) of a discrete random variable The pmf,

Probability Mass Function (pmf) of a discrete random variable

The pmf, p(x), of

a discrete random variable (X) simply lists the probabilities of each possible value, x, of the random variable.

E.g. Sum of values when two dice are thrown:

Слайд 17

Expected value and variance of discrete random variables The expected value,

Expected value and variance of discrete random variables

The expected value, or

mean, of a discrete random variable is defined as:

The variance of a discrete random variable is a measure of variability and is defined as:

N.B. σ is referred to as the standard deviation of X.

Слайд 18

E.g. Sum of values when two dice are thrown:

E.g. Sum of values when two dice are thrown:

Слайд 19

Expected value and variance of combinations of discrete random variables If

Expected value and variance of combinations of discrete random variables

If X

and Y are random variables and a and b are constants:
E(aX + bY) = aE(X) + bE(Y);
If X and Y are also independent random variables (i.e. the value of X has no influence on the value of Y (e.g. two throws of a die))
E(XY) = E(X)E(Y)
and
Var (aX + bY) = a2 Var(X) + c2 Var(Y).
Слайд 20

Law of Total Probability for Expected Values of a discrete random

Law of Total Probability for Expected Values of a discrete random

variable

Suppose events A1, A2, A3, … An are mutually exclusive and complete (i.e. one of them must occur), then the expected value of a r.v. X can be calculated by weighting the conditional expected values of X, i.e.:
E(X) = E(X/A1) . P(A1) + E(X/A2) . P(A2) + …E(X/An) . P(An)

For example if 20% of the working population work at home and the remaining 80% travel an average of 10 miles to work, the overall average distance travelled to work is:
E(travel to work distance) = 0 x 0.2 + 10 x 0.8 = 8 miles.

Слайд 21

Poisson Random Variable The most important discrete random variable in stochastic

Poisson Random Variable

The most important discrete random variable in stochastic

modelling is the Poisson random variable.

and its variance σ2 = β.

And Poisson probabilities can be obtained directly from the formula, statistical tables or computer software.

A Poisson distribution with mean β has pmf:

Слайд 22

The General Theory: When ‘events’ of interest occur ‘at random’ at

The General Theory:
When ‘events’ of interest occur ‘at random’ at rate

λ per unit time;
No. of events in period of time T has a Poisson distribution with mean λT
Events in real stochastic processes (e.g. arrivals of customers at a bank, calls to a call centre, patients to an A&E department, breakdowns in equipment) occur ‘at random’ when there are a large number of potential customers/ callers/ patients/ components each with independent probabilities of arriving/ calling/ falling ill/ breaking.

Poisson Random Variable

Слайд 23

Example: If arrivals of customers to a bank are at random,

Example:
If arrivals of customers to a bank are at random, at

an average rate of 0.6 per minute, then:
No. of arrivals in 5 minute period has Poisson distribution with mean = 3.

Poisson Random Variable

Слайд 24

Continuous Random Variables A random variable is a numerical description of

Continuous Random Variables

A random variable is a numerical description of the

outcome of an experiment.
When the values are ‘continuous’ , (e.g. height of randomly selected student, temperature in Lancaster, time between patients arriving at A&E), the random variable is continuous.
Слайд 25

Probability Density Functions (p.d.f.) The random behaviour of a continuous random

Probability Density Functions (p.d.f.)

The random behaviour of a continuous random variable

X is captured by the probability density function (p.d.f.) f (x), which is as follows:
f (x) is never negative
the total area under f (x) is one (total probability)
Слайд 26

Probabilities involving X are obtained by determining the area under the

Probabilities involving X are obtained by determining the area under the

pdf, i.e. f (x), for the appropriate range of values − e.g.

Methods to find areas under pdf are integration, statistical tables and computer software

Слайд 27

Expected value and variance of continuous random variables The expected value,

Expected value and variance of continuous random variables

The expected value, or

mean, of a continuous random variable is defined as:

The variance of a continuous random variable is a measure of variability and is defined as:

N.B. σ is referred to as the standard deviation of X.

Слайд 28

Expected value and variance of combinations of continuous random variables NB.

Expected value and variance of combinations of continuous random variables NB. Exactly

same as for discrete r.v.

If X and Y are random variables and a and b are constants:
E(aX + bY) = aE(X) + bE(Y);
If X and Y are also independent random variables (i.e. the value of X has no influence on the value of Y (e.g. two throws of a die))
E(XY) = E(X)E(Y)
and
Var (aX + bY) = a2 Var(X) + c2 Var(Y).

Слайд 29

Law of Total Probability for Expected Values of a continuous random

Law of Total Probability for Expected Values of a continuous random

variable
NB. Exactly same as for discrete r.v.

Suppose events A1, A2, A3, … An are mutually exclusive and complete (i.e. one of them must occur), then the expected value of a r.v. X can be calculated by weighting the conditional expected values of X, i.e:
E(X) = E(X/A1) . P(A1) + E(X/A2) . P(A2) + …E(X/An) . P(An)

Слайд 30

Exponential Random Variable The most important continuous random variable in stochastic

Exponential Random Variable

The most important continuous random variable in stochastic

modelling is the Exponential random variable.

and its variance σ2 = (1/γ)2,
i.e. variance = mean2

E.g. f(x) for Exponential r.v. with mean=4.

And areas under curve follow from simple formula:

Exponential distribution with mean 1/γ has pdf:

Слайд 31

The General Theory: When ‘events’ of interest occur ‘at random’ at

The General Theory:
When ‘events’ of interest occur ‘at random’ at rate

λ per unit time (as is common in real stochastic processes – see earlier note);
The time between events has an Exponential distribution with mean 1/λ.
And the time to the next event has an Exponential distribution with mean 1/λ, whether or not an event has just occurred. [This is the memoryless property of the Exponential distribution – and is counter-intuitive!].
Conversely, if the gaps between events are independent and from an exponential distribution with mean 1/λ, the events occur ‘at random’ at rate λ per unit time.

Exponential Random Variable

Слайд 32

Exponential Example THEORY IF Events occur ‘at random’, at rate A

Exponential Example

THEORY
IF Events occur ‘at random’, at rate A per unit

time.
THEN: Time between events has an Exponential distribution, with mean of 1/A.
AND: Time to next event has an Exponential distribution, with mean of 1/A.

EXAMPLE
IF Arrivals to bank occur ‘at random’, at rate of 0.6 per minute.
THEN: Time between arrivals has an Exponential distribution, with mean = 1.667 minutes.
AND: Time to next arrival has an Exponential distribution, with mean of 1.667 minutes.

Слайд 33

Normal Random Variable The most important continuous random variable in statistics

Normal Random Variable

The most important continuous random variable in statistics

is the Normal random variable.

& hence its standard deviation is σ.

E.g. f(x) for Normal r.v. with mean=μ and stan dev σ..

And areas under curve are obtained from statistical tables or from computer software.

Point of inflection

μ

μ+σ

Normal distribution with mean μ and variance σ2 has pdf:

Слайд 34

Standardised Normal Random Variable Areas under any Normal curve (mean=μ &

Standardised Normal Random Variable

Areas under any Normal curve (mean=μ & SD=σ)


can be found by finding the ‘equivalent’ area under the standard Normal curve
(mean=0 & SD=1), i.e.: