Random Variables Flashcards
Random Variable
A random variable is the numerical outcome of a random experiment.
Example of a random experiment
- Imagine a machine that draws a student at random from the student body. (The experiment). The student’s height, weight, sex are all random variables.
- The outcome of the toss of a coin is a random variable.
- Toss a pair of dice. Let X represent the sum of the dots on the two dice.
Notation for a random variable
- The random variable is typically named X
- The probability that a random variable X has the value x is written as Pr(X=x) or simply p(x)
Let X be the random variable representing the outcome of throwing a pair of dice and summing them. If we draw a probability histogram, what value will it be centered around and what will its probability be?
7
p(7) = 1/6
What principle enables us to use the properties of theoretical distributions to model data?
We can think of the frequentist definition of probability: ie: the relative frequence of an event “in the long run.” If a particular random experiment is repeated many times, the outcome begins to look like the theoretical distribution.
What symbols are coventionally used for the statistical properties of population versus sample data?
Population mean: µ
Sample mean: x̅
Population standard deviation: σ
Sample standard deviation: s
Population proportion: p
Sample proportion: p̂
Mean of a random discrete variable
µ = ∑ x·p(x)
The sum of all the possible values, each weighted by its probability.
A pair of coins is tossed multiple times. At each trial the number of heads is counted (ie 0, 1 or 2 heads). Let x represent the value. The following results are obtained:
x nx
0 260
1 517
2 223
Calculate the mean and compare it to the expected mean.
x̅ = 0*(.26) + 1*(.517) + 2*(.223)
= .963
Model µ = 0*.25 + .5*.5 + .25*.5
= 1
Variance of a random discrete variable
σ<span>2</span> = ∑ (x-µ)2 p(x)
What is the relationship between the mean and expected value of a random variable?
The mean of a random variable is equal to the expected value of the variable.
µ = E[X]
What is the probability that a random continuous variable will be equal to a particular value?
0
Since the random variable is continous, it can take on an infinite number of values. Since all these values are equally likely, the probability that it is a particular value will be 0.
For example, consider a balanced, spinning pointer. The probability that it will stop within a particular range of values can be calculated (for example P(.25 ≤ X ≤ .75) = .5) but not for a particular value such as .5.
X is a continuous random variable with probability density function given by f(x) = cx for 0 ≤ x ≤ 1, where c is a constant. Find c.
c=2
For any continuous random variable with probability density function f(x), we have that: ∫ f(x) dx= 1 when we integrate over all possible values of x.
We know that cdf If we integrate f(x) between 0 and 1 we get c/2. Hence c/2 = 1 (from the useful fact above!), giving c = 2.
Let x be a random variable and f(x) be its probability density function. What is the probability that x will occur in the interval [a, b]
∫f(x) dx, definite integral from a to b
If f(x) is the probability density function of a random continous variable X, what is the mean and variance ?
- µ = ∫ x·f(x) dx* from negative infinity to positive infinity (or all possible values of x).
- σ2 = ∫ (x-µ)2·f(x) dx* from negative infinity to positive infinity (or all possible values of x).
Suppose we are playing a gambling game depending on a coin toss. You ante up $6 to play; you get $10 if the result is a head. $0 if it is a tail.
What is your expected winning?
-1
Let W be a random variable representing you winnings:
W = 10X -6
where X is the original random variable with value 1 when a head results.
E[W] = E[10X - 6] = 10*E{X} -6 = -1