0% found this document useful (0 votes)
16 views16 pages

Contact Session 3b (Discrete Random Variable)

The document discusses discrete random variables and their probability distributions and functions. It defines discrete random variables as variables that can take on only certain outcomes with assigned probabilities. It also defines probability distributions and functions, expected values, and cumulative distribution functions. Several examples are provided to illustrate these concepts.

Uploaded by

rkrajath94
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views16 pages

Contact Session 3b (Discrete Random Variable)

The document discusses discrete random variables and their probability distributions and functions. It defines discrete random variables as variables that can take on only certain outcomes with assigned probabilities. It also defines probability distributions and functions, expected values, and cumulative distribution functions. Several examples are provided to illustrate these concepts.

Uploaded by

rkrajath94
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 16

Discrete Random Variables

1
Variables and Random Variables
Earlier, we saw that just like in algebra, we can use a variable to represent some
quantity, such as height.
i.e. It is just like a variable in statistics,
! A random variable represents a single except each outcome has now been
assigned a probability.
experiment/trial. It consists of outcomes with
a probability for each.

1 2 3 4 5 6
0.3 0.2 0.1 0.25 0.05 0.1

i.e. is a random variable (capital

𝑃 ( 𝑋=𝑥 ) letter), but is a particular outcome.

“The probability that… …the outcome of the …was the specific


random variable … outcome ”

A shorthand for is ! (note the lowercase ).


It’s like saying “the probability that the outcome of my coin throw was heads” ()
vs “the probability of heads” (). In the latter the coin throw was implicit.
2
Is it a discrete random variable?

The height of a person  


randomly chosen. This is a continuous random variable.

The number of cars that


 
pass in the next hour.

The number of countries in  


the world.
It does not vary, so is not a variable!

3
Probability Distributions vs Probability Functions
There are two ways to write the mapping from outcomes to probabilities.

The “{“ means we have a ‘piecewise function’.


This just simply means we choose the
function from a list depending on the input.
Probability Functions

{
e.g. if , then the
𝑝 ( 𝑥 ) = 0.1 𝑥 , 𝑥 =1 , 2 , 3 , 4 probability is
¿ 0 , 𝑜𝑡h𝑒𝑟𝑤𝑖𝑠𝑒
Advantages of probability function:
Can have a rule/expression based on the outcome.
Particularly for continuous random variables (in S2), it
would be impossible to list the probability for every
Probability Distribution
outcome. More compact.
1 2 3 4
0.1 0.2 0.3 0.4
The table form that you know and love.

Advantages of distribution:
Probability for each outcome more explicit.
4
Example
The random variable represents the number of heads when three
coins are tossed.

Underlying Probability Distribution


Sample Space Num heads 0 1 2 3

{ HHH,
HHT,
HTT, Probability Function
HTH,
THH,
THT,
TTH,
TTT }
5
Question
(Hint: Use your knowledge
that )

p(-1) = 4k, p(0) = k, p(1) = 0, p(2) = k


And since , 4k + k + 0 + k = 6k = 1
Therefore

6
Exercise (Solve Now)
The random variable X has a probability function
.
Show that

7
Exercise
The random variable X has a probability function:

where k is a constant.

a) Find the value of k.


b) Construct a table giving the probability distribution of .
7a) k = 0.125
7b)
x 1 2 3 4
P(X = x) 0.125 0.125 0.375 0.375

8
Probabilities of ranges of values

1 2 3 4 5 6
0.1 0.2 0.3 0.25 0.1 0.05

9
Cumulative Distribution Function (CDF)
How could we express “the If X is the number of heads
probability that the age of someone thrown in 2 throws...
is at most 40”?

0 1 2
0.25 0.5 0.25

F is known as the cumulative 0 1 2


distribution function, where
0.25 0.75 1
(note the capital F)

10
Example
The discrete random variable X has a cumulative distribution function
defined by:

; x = 1, 2 and 3

a Find the value of k.


F(3) = 1. Thus k = 5.

b Draw the distribution table for the cumulative distribution function.


x 1 2 3
F(x) 3/4 7/8 1
c Write down F(2.6)
F(2.6) = F(2) = 7/8

d Find the probability distribution of X. x 1 2 3


P(X=x) 3/4 1/8 1/8
11
CDF

1
p(x)

F(x)

Shoe Size (x) Shoe Size (x)

It’s just like how we’d turn a frequency graph


into a cumulative frequency graph. 12
Questions

x 1 2 3
P(X = x) 0.4 0.25 0.35
= 0.4

F(3) = 1, so (27 + k)/40 = 1, ...


x 1 2 3
P(X = x) 0.35 0.175 0.475
13
Expected Value, E[X]
Suppose that we throw a single fair die 60 times, and see the following outcomes:

Throw a lot of times.


1 2 3 4 5 6
Frequency 9 11 10 8 12 10

What is the mean outcome based on our sample?


But using the actual probabilities of each outcome (i.e. 1/6 for each), what would
we expect the average outcome to be?
3.5

! If is the random variable, is known as the expected value of .

It represents the mean outcome we would expect if we were to do our experiment


lots of times.

For our fair die:


14
Quick-fire E[X]
Find the expected value of the following distributions (in your head!).

1 2 3 4 6 8
0.1 0.6 0.3 0.5 0.25 0.25

𝐸 ( 𝑋 )= 2.2 𝐸 ( 𝑋 )=5.5
Tip: Suppose you treated the probabilities as
frequencies then found the mean of the ‘frequency
table’. What do you notice?

10 20 30

𝐸 ( 𝑋 )= 20
Tip: If the distribution is ‘symmetrical’, i.e. both the outcomes
and probabilities are symmetrical about the centre, then the
expected value is this central value. 15
Harder Example

1 2 3 4 5

Given that , find the values of and .

Probabilities add to 1:
Expected value:

Solving simultaneous equations:

16

You might also like