Probability Theory Random Variables and Distributions

75
Probability Theory Random Variables and Distributions Rob Nicholls MRC LMB Statistics Course 2014

description

Probability Theory Random Variables and Distributions. Rob Nicholls MRC LMB Statistics Course 2014. Introduction. Introduction. Significance magazine (December 2013) Royal Statistical Society. Introduction. Significance magazine (December 2013) Royal Statistical Society. Introduction. - PowerPoint PPT Presentation

Transcript of Probability Theory Random Variables and Distributions

Page 1: Probability Theory Random Variables and Distributions

Probability TheoryRandom Variables and

DistributionsRob Nicholls

MRC LMB Statistics Course 2014

Page 2: Probability Theory Random Variables and Distributions

Introduction

Page 3: Probability Theory Random Variables and Distributions

Introduction

Significance magazine (December 2013) Royal Statistical Society

Page 4: Probability Theory Random Variables and Distributions

Introduction

Significance magazine (December 2013) Royal Statistical Society

Page 5: Probability Theory Random Variables and Distributions

Introduction

Significance magazine (December 2013) Royal Statistical Society

Page 6: Probability Theory Random Variables and Distributions

Contents• Set Notation• Intro to Probability Theory• Random Variables• Probability Mass Functions• Common Discrete Distributions

Page 7: Probability Theory Random Variables and Distributions

Set NotationA set is a collection of objects, written using curly brackets {}

If A is the set of all outcomes, then:

A set does not have to comprise the full number of outcomes

E.g. if A is the set of dice outcomes no higher than three, then:

Page 8: Probability Theory Random Variables and Distributions

Set NotationIf A and B are sets, then:

Complement – everything but A

Union (or)

Intersection (and)

Not

Empty Set

Page 9: Probability Theory Random Variables and Distributions

Set NotationVenn Diagram:

AB

one

two, three six four five

Page 10: Probability Theory Random Variables and Distributions

Set NotationVenn Diagram:

AB

one

two, three six four five

Page 11: Probability Theory Random Variables and Distributions

Set NotationVenn Diagram:

AB

one

two, three six four five

Page 12: Probability Theory Random Variables and Distributions

Set NotationVenn Diagram:

AB

one

two, three six four five

Page 13: Probability Theory Random Variables and Distributions

Set NotationVenn Diagram:

AB

one

two, three six four five

Page 14: Probability Theory Random Variables and Distributions

Set NotationVenn Diagram:

AB

one

two, three six four five

Page 15: Probability Theory Random Variables and Distributions

Set NotationVenn Diagram:

AB

one

two, three six four five

Page 16: Probability Theory Random Variables and Distributions

Set NotationVenn Diagram:

AB

one

two, three six four five

Page 17: Probability Theory Random Variables and Distributions

Probability TheoryTo consider Probabilities, we need:

1. Sample space: Ω

2. Event space:

3. Probability measure: P

Page 18: Probability Theory Random Variables and Distributions

Probability TheoryTo consider Probabilities, we need:

1. Sample space: Ω - the set of all possible outcomes

Page 19: Probability Theory Random Variables and Distributions

Probability TheoryTo consider Probabilities, we need:

2. Event space: - the set of all possible events

Page 20: Probability Theory Random Variables and Distributions

Probability TheoryTo consider Probabilities, we need:

3. Probability measure: P

P must satisfy two axioms:

Probability of any outcome is 1 (100% chance)

If and only if are disjoint

Page 21: Probability Theory Random Variables and Distributions

Probability TheoryTo consider Probabilities, we need:

3. Probability measure: P

P must satisfy two axioms:

Probability of any outcome is 1 (100% chance)

If and only if are disjoint

Page 22: Probability Theory Random Variables and Distributions

Probability TheoryTo consider Probabilities, we need:

1. Sample space: Ω2. Event space: 3. Probability measure: P

As such, a Probability Space is the triple: (Ω, ,P )

Page 23: Probability Theory Random Variables and Distributions

Probability TheoryTo consider Probabilities, we need:

The triple: (Ω, ,P )

i.e. we need to know:1. The set of potential outcomes;2. The set of potential events that may occur; and3. The probabilities associated with occurrence of those

events.

Page 24: Probability Theory Random Variables and Distributions

Probability TheoryNotable properties of a Probability Space (Ω, ,P ):

Page 25: Probability Theory Random Variables and Distributions

Probability TheoryNotable properties of a Probability Space (Ω, ,P ):

Page 26: Probability Theory Random Variables and Distributions

Probability TheoryNotable properties of a Probability Space (Ω, ,P ):

Page 27: Probability Theory Random Variables and Distributions

Probability TheoryNotable properties of a Probability Space (Ω, ,P ):

A B

Page 28: Probability Theory Random Variables and Distributions

Probability TheoryNotable properties of a Probability Space (Ω, ,P ):

A B

Page 29: Probability Theory Random Variables and Distributions

Probability TheoryNotable properties of a Probability Space (Ω, ,P ):

A B

Page 30: Probability Theory Random Variables and Distributions

Probability TheoryNotable properties of a Probability Space (Ω, ,P ):

Page 31: Probability Theory Random Variables and Distributions

Probability TheoryNotable properties of a Probability Space (Ω, ,P ):

If then and

A B

Page 32: Probability Theory Random Variables and Distributions

Probability TheoryNotable properties of a Probability Space (Ω, ,P ):

If then and

A B

Page 33: Probability Theory Random Variables and Distributions

Probability TheoryNotable properties of a Probability Space (Ω, ,P ):

If then and

A B

Page 34: Probability Theory Random Variables and Distributions

Probability TheoryNotable properties of a Probability Space (Ω, ,P ):

If then and

A B

Page 35: Probability Theory Random Variables and Distributions

Probability TheoryNotable properties of a Probability Space (Ω, ,P ):

If then and

Page 36: Probability Theory Random Variables and Distributions

Probability TheoryNotable properties of a Probability Space (Ω, ,P ):

If then and

Page 37: Probability Theory Random Variables and Distributions

Probability TheorySo where’s this all going? These examples are trivial!

Page 38: Probability Theory Random Variables and Distributions

Probability TheorySo where’s this all going? These examples are trivial!

Suppose there are three bags, B1, B2 and B3, each of which contain a number of coloured balls:• B1 – 2 red and 4 white• B2 – 1 red and 2 white• B3 – 5 red and 4 white

A ball is randomly removed from one the bags.The bags were selected with probability:• P(B1) = 1/3• P(B2) = 5/12• P(B3) = 1/4

What is the probability that the ball came from B1, given it is red?

Page 39: Probability Theory Random Variables and Distributions

Probability Theory

Conditional probability:

Partition Theorem:

Bayes’ Theorem:

If the partition

Page 40: Probability Theory Random Variables and Distributions

Random VariablesA Random Variable is an object whose value is determined by chance, i.e. random events

Maps elements of Ω onto real numbers, with corresponding probabilities as specified by P

Page 41: Probability Theory Random Variables and Distributions

Random VariablesA Random Variable is an object whose value is determined by chance, i.e. random events

Maps elements of Ω onto real numbers, with corresponding probabilities as specified by P

Formally, a Random Variable is a function:

Page 42: Probability Theory Random Variables and Distributions

Random VariablesA Random Variable is an object whose value is determined by chance, i.e. random events

Maps elements of Ω onto real numbers, with corresponding probabilities as specified by P

Formally, a Random Variable is a function:

Probability that the random variable X adopts a particular value x:

Page 43: Probability Theory Random Variables and Distributions

Random VariablesA Random Variable is an object whose value is determined by chance, i.e. random events

Maps elements of Ω onto real numbers, with corresponding probabilities as specified by P

Formally, a Random Variable is a function:

Probability that the random variable X adopts a particular value x:

Shorthand:

Page 44: Probability Theory Random Variables and Distributions

Random VariablesExample:

If the result is heads then WIN - X takes the value 1If the result is tails then LOSE - X takes the value 0

Page 45: Probability Theory Random Variables and Distributions

Random VariablesExample:

Win £20 on a six, nothing on four/five, lose £10 on one/two/three

Page 46: Probability Theory Random Variables and Distributions

Random VariablesExample:

Win £20 on a six, nothing on four/five, lose £10 on one/two/three

Note – we are considering the probabilities of events in

Page 47: Probability Theory Random Variables and Distributions

Probability Mass FunctionsGiven a random variable:

The Probability Mass Function is defined as:

Only for discrete random variables

Page 48: Probability Theory Random Variables and Distributions

Probability Mass FunctionsExample:

Win £20 on a six, nothing on four/five, lose £10 on one/two/three

Page 49: Probability Theory Random Variables and Distributions

Probability Mass FunctionsNotable properties of Probability Mass Functions:

Page 50: Probability Theory Random Variables and Distributions

Probability Mass FunctionsNotable properties of Probability Mass Functions:

Interesting note:If p() is some function that has the above two properties, then it is the mass function of some random variable…

Page 51: Probability Theory Random Variables and Distributions

Mean:

For a random variable

Probability Mass Functions

Page 52: Probability Theory Random Variables and Distributions

Probability Mass Functions

Mean:

For a random variable

Mean

Page 53: Probability Theory Random Variables and Distributions

Probability Mass Functions

Mean:

For a random variable

Compare with:

Mean

Page 54: Probability Theory Random Variables and Distributions

Probability Mass Functions

Mean:

For a random variable

Median: any m such that: and

MeanMedian

Page 55: Probability Theory Random Variables and Distributions

Probability Mass Functions

Mean:

For a random variable

Median: any m such that: and

Mode: : most likely value

MeanMedianMode

Page 56: Probability Theory Random Variables and Distributions

Common Discrete Distributions

Page 57: Probability Theory Random Variables and Distributions

Common Discrete DistributionsThe Bernoulli Distribution:

p : success probability

Page 58: Probability Theory Random Variables and Distributions

Common Discrete DistributionsThe Bernoulli Distribution:

p : success probability

Example:

Therefore

Page 59: Probability Theory Random Variables and Distributions

Common Discrete DistributionsThe Binomial Distribution:

n : number of independent trialsp : success probability

Page 60: Probability Theory Random Variables and Distributions

Common Discrete DistributionsThe Binomial Distribution:

n : number of independent trialsp : success probability

: probability of getting x successes out of n trials

: probability of x successes

: probability of (n-x) failures

: number of ways to achieve x successes and (n-x) failures (Binomial coefficient)

Page 61: Probability Theory Random Variables and Distributions

Common Discrete DistributionsThe Binomial Distribution:

n : number of independent trialsp : success probability

Page 62: Probability Theory Random Variables and Distributions

Common Discrete DistributionsThe Binomial Distribution:

n : number of independent trialsp : success probability

Page 63: Probability Theory Random Variables and Distributions

Common Discrete DistributionsThe Binomial Distribution:

n : number of independent trialsp : success probability

Page 64: Probability Theory Random Variables and Distributions

Common Discrete DistributionsThe Binomial Distribution:

n : number of independent trialsp : success probability

Page 65: Probability Theory Random Variables and Distributions

Common Discrete DistributionsExample:

Number of heads in n fair coin toss trials

In general:

Page 66: Probability Theory Random Variables and Distributions

Common Discrete DistributionsExample:

Number of heads in n fair coin toss trials

In general:

Notice:

Page 67: Probability Theory Random Variables and Distributions

Common Discrete DistributionsThe Poisson Distribution:

λ : average number of counts (controls rarity of events)

Used to model the number of occurrences of an event that occur within a particular interval of time and/or space

Page 68: Probability Theory Random Variables and Distributions

Common Discrete Distributions

• Want to know the distribution of the number of occurrences of an event Binomial?

• However, don’t know how many trials are performed – could be infinite!

• But we do know the average rate of occurrence:

The Poisson Distribution:

Page 69: Probability Theory Random Variables and Distributions

Common Discrete DistributionsBinomial:

Page 70: Probability Theory Random Variables and Distributions

Common Discrete DistributionsBinomial:

Page 71: Probability Theory Random Variables and Distributions

Common Discrete DistributionsBinomial:

1

1

Page 72: Probability Theory Random Variables and Distributions

Common Discrete DistributionsBinomial:

1

1

Page 73: Probability Theory Random Variables and Distributions

Common Discrete DistributionsBinomial:

1

1

Page 74: Probability Theory Random Variables and Distributions

This is referred to as the:• “Poisson Limit Theorem” • “Poisson Approximation to the Binomial”• “Law of Rare Events”

Common Discrete DistributionsThe Poisson distribution is the Binomial distribution as

If then

If n is large and p is small then the Binomial distribution can be approximated using the Poisson distribution

fixed

Poisson is often more computationally convenient than Binomial

Page 75: Probability Theory Random Variables and Distributions

ReferencesCountless books + online resources!

Probability theory and distributions:

• Grimmett and Stirzker (2001) Probability and Random Processes. Oxford University Press.

General comprehensive introduction to (almost) everything mathematics (including a bit of probability theory):

• Garrity (2002) All the mathematics you missed: but need to know for graduate school. Cambridge University Press.