Random Variables & Distributions

A random variable quantifies chance events, and its probability distribution assigns a likelihood to each of its values.

The distribution contains all the information we have about the random variable, so it is a very important concept in probability theory.

In this quiz, we'll start with distributions of discrete random variables and then move on to the continuous case.



Roll a die in the shape of an icosahedron, a solid figure having twenty faces that are equilateral triangles.

An icosahedron die An icosahedron die

Let X X be the random variable that assigns a die roll its value; the range of XX is equal to the set {1,2,,19,20}. \{ 1, 2, \dots, 19, 20 \}. If the die is fair, what is P(X=n)? P(X = n) ?



The probability distribution of the icosahedron die is called uniform because all of the likelihoods for the possible die rolls are the same.

There are plenty of nonuniform examples. Consider flipping a fair coin ten times in a row. Let N N be the number of heads in such a flip sequence.

Find a formula for P(N=n)P(N = n) for n=0,1,2,,10, n = 0, 1, 2 , \dots, 10, the random variable's possible values.

Hint: The number of ways to choose k k objects from a set of n n is (nk)=n!k!(nk)!,{n \choose k} = \frac{n!}{k!(n-k)!}, where n!=n(n1)(n2)1n! = n(n-1)(n-2) \cdots 1 for n1n \geq 1 and 0!=1.0! = 1.



Any trial or experiment whose outcome can be classified as either a success or a failure is called a Bernoulli trial.

If the probability of success is p,p, the probability of failure is 1p, 1-p, and when T T consecutive trials are performed, the number of successes N N is distributed as P(N=n)=(Tn)pn(1p)Tn; P(N=n) = {T \choose n} p^{n} (1-p)^{T-n}; this distribution for N N is called binomial because of the binomial coefficient (Tn).{T \choose n}.

The coin flip is an example with p=12,T=10 p = \frac{1}{2}, T = 10; we'll see more examples later in the course.



Once we have XX's probability distribution, we can compute the expected value E[X],E[X], which is the sum of all of XX's values weighted by their probabilities: E[X]=nX’s rangenP(X=n).E[X] = \sum\limits_{n \in X\text{'s range}} n P(X = n). Let's say an unfair coin comes up heads three times out of every four flips. We flip this coin twice in a row; if NN is the number of times it lands heads up, NN's probability distribution is P(N=n)=(2n)(34)n(14)2n. P(N = n ) = {2 \choose n}\left( \frac{3}{4} \right)^{n} \left( \frac{1}{4} \right)^{2-n}. What's the average number of heads we should expect to see if we perform this coin flip experiment many times?

Good to Know: j=0naj \sum\limits_{j=0}^{n} a_{j} means a0+a1++an a_{0} + a_{1} + \dots + a_{n} and (20)=1, (21)=2 ,(22)=1. {2 \choose 0} = 1, \ {2 \choose 1 } = 2 \ , {2 \choose 2 } = 1.



Another valuable quantity we can find from X X's distribution is its variance Var[X]=E[(XE[X])2]=E[X22E[X]X+(E[X])2]=E[X2]2(E[X])2+(E[X])2=E[X2](E[X])2,\begin{aligned} \text{Var}[X]& = E[(X-E[X])^2] \\ & = E[X^2- 2 E[X] X +(E[X])^2] \\ & = E[X^2]-2 (E[X])^2+(E[X])^2 \\ & = E\big[X^2\big] - \big( E[X]\big)^2,\end{aligned} which measures the spread of observed values away from the expected one.

(These expected value properties will be explained in greater detail later in the course.)

What's the spread of the double-flip coin experiment from the last problem? Remember, if NN is the number of heads, P(N=n)=(2n)(34)n(14)2n P(N = n ) = {2 \choose n}\left( \frac{3}{4} \right)^{n} \left( \frac{1}{4} \right)^{2-n} where (20)=1, (21)=2 ,(22)=1. {2 \choose 0} = 1, \ {2 \choose 1 } = 2 \ , {2 \choose 2 } = 1.



We find it useful to assign distribution functions to continuous random variables as well: P(aXb)=x=ax=bf(x)dx P( a \leq X \leq b) = \int\limits_{x = a }^{x=b} f(x) dx for some density function f(x).f(x). The integral means the area below ff's graph and above the xx-axis between a a and b.b. In a loose sense, we think of \int as a sum of continuous values, much like \sum is a sum of discrete ones.

For instance, if the sample space is a fixed interval, say [2,3], [-2,3], we can choose f(x) f(x) to be a constant; this choice gives us the uniform distribution.

What constant value must f f have in order for this density to define a probability distribution over the sample space [2,3]? [-2,3] ?

Hint: In each random experiment, it's certainly the case that we draw at least some x x from the sample space.



The density function allows us to find interesting characteristics of a continuous random variable, like its expected value: E[X]=range of Xxf(x)dx, E[X] = \int\limits_{\text{range of } X} x f(x)\, dx, which is very similar to the version for discrete random variables.

What is the expected value of the uniform distribution f=15 f = \frac{1}{5} on Ω=[2,3]? \Omega = [-2,3] ?

Hint: If you want to avoid using calculus, remember that the graph of x5 \frac{x}{5} is a straight line through the origin, so E[X] E[X] is related to the area of two triangles, one on either side of x=0. x= 0.



What is the variance of the uniform distribution on [2,3]? [ -2,3] ? Recall that Var[X]=E[X2](E[X])2. \text{Var}[X] = E\big[X^2\big] - \big( E[X]\big)^2.

Good to Know: If you want to avoid calculus, the area below the parabola y=x2y=x^2 and above the xx-axis between a a and b b is 13[b3a3]. \frac{1}{3} [b^3-a^3].



Discrete and continuous random variables and probability distributions are the central characters in our course.

We introduced these ideas in this quiz and the last; in the next quiz, we'll review by applying them to a few interesting real-world problems.



Problem Loading...

Note Loading...

Set Loading...