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

Probability Theory

Random Variables

Petros Bofakos
Definition
• Let Ω be the sample space of a random experiment.

• A function X: Ω  R that maps an event of Ω to a


real number, is called a random variable.

• For each ω Ε Ω, X(ω) is called the value of ω.

• We will only examine discrete random variables,


i.e., variables where the value set X(Ω) is a sequence
of numbers.
Example s1
• Example s1: suppose you flip a coin two times. This
simple experiment can have four possible outcomes:
Ω= {HH, HT, TH, TT}.
• Now, let the random variable X represent the number
of heads that result from the coin flips. The variable X
can take on the values 0, 1, or 2
X: Ω{0,1,2}
• Below we list the probability of each value of X
Number of Heads Probability We write
X=0 0.25 P(X=0)=0.25
X=1 0.50 P(X=1)=0.50
X=2 0.25 P(X=2)=0.25
Example s2
• You flip a coin until the result is heads
• Define random variable X as follows:
– X=i iff the result on the i-th toss was heads and all
the previous results were tails
• Ω={H,TH,TTH,TTTH,TTTH,…}
• X: Ω{1,2,3,4,5,…}

P(Χ=1) = 0.5;
P(Χ=2)= 0.5 0.5 = 0.25
P(Χ=3) = 0.5 0.5 0.5 = 0.125
P(X=n) = 0.5n
More examples
• Example 1 (a),(b) (pg 359)
• Your own examples
Expectation
• Example s3: You roll a fair die many times.
The possible outcomes (1,2,3,4,5,6) have
equal chance (1/6), so you expect each of
them to occur about equal number of times.
• The average value of the outcome is expected
to be (1+2+3+4+5+6)/6=3.5
• This is called the expectation or expected
value or mean
• Notice that, in the above example, 3.5 is not a
possible outcome.
• Example s4: What if the die is not fair and the number 6
has 50% chance while the rest have equal chance?
Expectation (Definition)
• Given a random variable X on a finite
sample space Ω, the expectation or
expected value or mean of Ω is defined
by

• If all the outcomes are equally likely, then


Examples
Example s1: μ = 0.25 0 + 0.5 1 +0.25 2 = 1
Example s2: ??

Example 1 (Pg 367)


- Define random variable X
- Calculate expectation μ

Example s5: You roll two dice. Define a random variable


for the sum of the numbers on the dice and calculate
the expectation of the random variable.
Expectation
• Let X,Y be random variables over a finite sample
space Ω. Then

• E(X+Y) = E(X)+E(Y)

• E(aX) = aE(X) for any real number a

• E(c) =c where c is a constant random variable


(that is a function c:ΩR with X(ω)=c for every
ω Є Ω).
Corollary
• Let X be a random variable having
expectation μ. Then
E(X-μ) = 0

• Proof:
E(X-μ) = Ε(Χ) – Ε(μ) = μ-μ=0
Standard Deviation
• The expectation tell us what’s the expected
‘average’ of an experiment.

• However, it does not tell us how close the


actual outcomes are expected to be to this
‘average’.

• For measuring this, we use the standard


deviation σ which measures the “average”
deviation of the outcomes from the
“average” μ.
Standard Deviation and Variance
Definitions
• Let X be a random variable. The standard
deviation σ or σX of X is defined as the square
root of the the expectation of the random variable
(X-μ)2:

• The square of the standard deviation is called the


variance of X:
Theorem
• For a discrete random variable X with
expectation μ, we can prove that:

• This theorem provide us with a useful formula


for calculating the variance of a random
variable.
Examples
• Example s3:
– Recall that μ = 3.5

• Example s4:
– Recall that μ = 4.5

• Example s1
– μ = 0.25 0 + 0.5 1 +0.25 2 = 1
More examples
• Calculate the variance for examples s2,
s5.
Exercises
• 1,2,4,5 (Pg 373-374)
• Each match played by a football team is won by that
team with probability 1/2, is a drawwith probability 1/6,
and is lost with probability 1/3, with the result of each
match being independent of all other results. For each
of the following define a random variable and calculate
its expectation and variance.
• i) The number of drawn matches in a season lasting 6
matches.
• ii) The number of matches up to and including their
first win (6 matches max).
• iii) The number of matches following their first defeat
up to and including their next win (6 matches max).
• iv) The number of matches up to and including their
second loss. (6 matches max).

Вам также может понравиться