








































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
[Week 3] Random Variables -- Continuous/Discrete
Typology: Lecture notes
1 / 80
This page cannot be seen from the preview
Don't miss anything!









































































Random Variables Discrete Random Variables Discrete Distributions Mean and Variance of Discrete Distributions Binomial Distribution Continuous Random Variables Comparing Discrete and Continuous Distributions Normal Distribution Normal Probabilities Normal Percentiles Combinations of Random Variables Linear Function of a Random Variable Independence of Random Variables Sums of Random Variables (Try to derive these from previous slides) Sums of Normal Random Variables Sums of Non-Normal Random Variables (CLT) Extra Materials Other Continuous Distributions (^) 2/
Tasmania is currently free of fruit fly which adds several million dollars to the annual export income earned by the horticultural industries. However the 14 species of fruit fly on the Australian mainland are a constant economic threat. South Australia remains the only Australian mainland state that is fruit fly free, with prevention, detection and eradication measures costing about $ million annually.
Biosecurity
Suppose there are 100 fruit flies buzzing around a lime tree. The flies have a 20% chance on landing on the tree and act independently.
What is the probability that exactly 20 flies land on the lime tree?
Note: If there were only 2 flies, we could use simple probability. I (^) The set of all possible values: x = 0, 1 , 2. I (^) The likelihood of each value (discrete): P (X = 0) = P (no flies land) = 0. 8 × 0 .8 = 0. 64 P (X = 1) = P (1 fly lands) = 0. 2 × 0 .8 + 0. 8 × 0 .2 = 0. 32 P (X = 2) = P (both flies land) = 0. 22 = 0. 04
But we can’t use this approach for a realistic number of flies, like n = 100. So we need to develop a general formula for P (X = x).
For any random variable X with a discrete distribution, we have a sample space Ω with values x = {x 1 , x 2 ,.. .} and associated probabilities {p 1 , p 2.. .}, where {pi = P (X = xi)}.
Properties: I (^) there is a countable number of possible values; I
i pi^ = 1
The probability distribution function (or probability distribution) of X is the set of {x, P (X = x)}.
The cumulative distribution function (CDF) of X is
F (x) = P (X ≤ x)
This is a step function.
The variance of X is
σ^2 = V ar(X) = E(X − μ)^2 = E(X^2 ) − E(X)^2
I (^) I have promised you before that there are two interpretations of probabilities: data-driven and theoretical. I (^) A major reason that we introduced random variables is to use the theoretical probabilities to model the data-driven probabilities. I (^) This connection is very similar to the sample-population relationship we introduced in the first week: we are modelling the population mathematically using probability theory and random variables, but the construction of this model comes from collected samples.
Let X = the number of heads in 5 tosses of a coin, x = 0, 1 ,... , 5 , with probability distribution function:
x 0 1 2 3 4 5 P (X = x) 321 325 1032 1032 325 321
Find the mean and variance of X.
μ = E(X) =
x
xP (X = x) = 0 ×
i
x^2 P (X = x) = 0^2 ×
Hence
V ar(X) = E(X^2 ) − E(X)^2 = 7. 5 − (2.5)^2 = 1. 25
In a certain game, 5 coins are tossed, where X denotes the number of heads. It costs $8.00 to play, and the player receives $2X^ as prize money. Show that the expected loss for 1 game is $0. 41.
Suppose you toss a fair coin 1000 times: when it lands heads you receive $1, and when it lands tails you pay me $1. What is your expected profit or loss?
#Check your answers x=c(0,1,2,3,4,5) p=c(1,5,10,10,5,1)/ sum((2^x)*p)-8.
x=c(1,-1) p=c(0.5,0.5) sum(x*p)
The Binomial distribution models a context in which we have: I (^) a fixed number n of independent Binary trials; I (^) a fixed likelihood of a success at each trial p = P (success).
If X = the number of successes in n trials, then X ∼ Bin(n, p) with
P (X = x) =
n x
px(1 − p)n−x^ for x = 0, 1 , 2 ,... , n.
Notes: I (^) A Binary (or Bernoulli) trial is an event where there can only be 2 options: success or failure. For example, 1 fruit fly is buzzing around a fruit tree: will it land or not? I (^) Success designates the event we are interested in counting, which may not be good. For example, p = P (fruit fly lands on fruit tree). I (^) The Binomial distribution has 2 parameters: n and p. Parameters represent the numerical inputs needed for the model. I (^) It can be shown (by algebra) that the Binomial distribution has mean E(X) = np and variance V ar(X) = np(1 − p).