STAT1008 Lecture Notes - Lecture 20: Week, Random Variable, Countable Set
STAT1008 Week 7 Lecture B
● Random Variables
○ A random variable is a numeric quantity that changes from trial to trial in a
random process
○ E.g. Number of home team wins in a football season, sum of two dice rolls, grade
on next stats exam, time to run 1km and weight of a rat
● Discrete vs Continuous
○ A random variable is discrete if it has a countable set of possible values
■ X = home wins in rugby league
■ Y = sum of two dice rolls
■ Doesn’t need to be finite can be infinite number of outcomes
○ A random variable is continuous if it can take on any numeric values within some
interval
■ T = time to run one km
■ W = Weight of a rat
● Probability function:
○ A probability function assigns a probability to each value of a discrete random
variable
■ Example: X = number of heads in two coin flips thus four likely outcomes
= HH, TH, HT, TT
■ Note for any probability function: sum of p(x) = 1
■ I.e. X = sum of 2 dice
■ X = 2 (1/36), 3 (2/36), 4(3/36), …, 12 (1/36)
■ P(X<5) thus p(2) + p(3) + p(4) = ᪤
■ P(X but not 7)= 1- p(7) = 1- ᪤ = ᪥
● Mean of a random variable:
○ The mean of a discrete random variable with probability function p(x), is given by
■ E(X) = mu = sum of x.px
■ E(X) = expected value
● Variance and Standard Deviation:
○ The variance for a discrete random variable with probability function p(x) and
mean (mu) is given by
■ Var(X) : std dev2 = sum of (x-mu)2.p(x)
● Binomial Random Variable:
○ Binomial random variable counts the number of “successes” (any outcome of
interest) in a sequence of trials where
■ The number of trials, n, is fixed in advance
■ The probability of success, p, is the same on each trial
■ Successive trials are independent of each other
find more resources at oneclass.com
find more resources at oneclass.com
Document Summary
A random variable is a numeric quantity that changes from trial to trial in a random process. Number of home team wins in a football season, sum of two dice rolls, grade on next stats exam, time to run 1km and weight of a rat. A random variable is discrete if it has a countable set of possible values. X = home wins in rugby league. Y = sum of two dice rolls. Doesn"t need to be finite can be infinite number of outcomes. A random variable is continuous if it can take on any numeric values within some interval. T = time to run one km. A probability function assigns a probability to each value of a discrete random variable. Example: x = number of heads in two coin flips thus four likely outcomes. Note for any probability function: sum of p(x) = 1. X = 2 (1/36), 3 (2/36), 4(3/36), , 12 (1/36)