Random Variables

Text before the first section.

Discrete Random Variables

Let \Omega be a sample space. A random variable is a function X \colon \Omega \to \mathbb{R} which assigns a number to each outcome.

Suppose an experiment consists of flipping a fair coin 4 times. Let X be the number of heads. The actual outcomes in the experiment are heads/tails sequences of length 4, such as HTHT and HHHT. The random variable X assigns a numerical measurement to the outcomes, such as X(HTHT) = 2 and X(HHHT) = 3.

For any real number value a, we can consider the event consisting of outcomes such that X = a. For example, the flip sequences HHHT, HHTH, HTHH, and THHH all have 3 heads, so \Pr(X = 3) = \frac{4}{16} = \frac{1}{4}.

Indicator Random Variable

Let A be an event in the sample space \Omega. An indicator random variable for A is the random variable X such that X(\omega) = \begin{cases} 1 \amp \omega \in A \\ 0 \amp \omega \notin A \end{cases}

Indicator random variables are also called Bernoulli random variables, although we'll prefer the former term since it more clearly states the purpose of these random variables: to indicate whether or not a particular event has occurred. We'll use the language "X indicates A" to mean that X is an indicator random variable for the event A. In this case, \Pr(X = 1) = \Pr(A), and \Pr(X = 0) = 1 - \Pr(A).

Consider the set S of all real numbers which are actually output by a random variable X. If S does not contain any interval of values, then the random variable X is called discrete. Otherwise, it's called continuous.

Any random variable X defined on a finite sample space \Omega is discretethe set of outputs of X cannot contain an interval if it only has finitely many values.

Suppose an experiment consists of growing a plant in a new fertilizer, and a random variable Y measures the height of the plant after a set growing period. Now Y could conceivably take on an interval's worth of values (such as, e.g., any real number between 10 inches and 20 inches), so this random variable would be continuous.

The distinction between discrete and continuous random variables is not simply the distinction of whether the sample space is finite or infinite. Consider the experiment in which we flip a coin repeatedly until we first see a coin come up heads. Let Z be the number of times the coin is flipped. Then there are infinitely many possible values of Z (1, 2, 3, and so on), but there's no interval of real numbers which are all possible outputs of Z. The possible outputs of Z are discrete (in the non-technical, English sense of the word: separated).

We flip a coin with unknown bias 100 times and observe 43 heads. What is the maximum likelihood estimation for the probability of the coin coming up heads?

An experiment consists of flipping a biased coin 20 times. If the coin comes up heads with probability \theta = 0.3, find the probability of seeing 5 heads. Find the probability of seeing up to (and including) 3 heads.

An experiment consists of flipping a coin repeatedly until we first see heads.

If the coin comes up heads with probability 0.4, what is the probability we’ll see our first heads within three flips? What about precisely on the third flip?

Suppose the coin has an unknown probability of coming up heads. We perform the experiment in five independent trials, during which it takes 4, 5, 4, 3, and 6 flips to see our first heads in each trial. What is the maximum likelihood estimation for the probability of the coin coming up heads on a flip?

A particular store has an average of 20 customers each hour. During a 4-hour afternoon shift, what is the probability of serving 80 customers.

A particular store owner wants to approximate the average hourly rate at which customers come into the store. They observe 80 customers enter during a particular 4-hour shift. What is the maximum likelihood estimation for the hourly customer rate?

Continuous Random Variables

Text of section.

A continuous random variable X taking values in [1, 4] has p.d.f. f(x) = k(x - \sqrt{x}) for some constant k. What is the value of k?

A continuous random variable X taking values in [1, 2] has p.d.f. \displaystyle{f(x) = \frac{1}{2}\left(\frac{1}{x^2} + x\right)}. Find the c.d.f. F(x). Use your c.d.f. to find \Pr\left(1 \leq X \leq \frac{3}{2}\right).

A continuous random variable X taking values in [2, 3] has c.d.f. F(x) = \frac{x^3}{3} - x^2 + 4. Find the p.d.f. f(x).

A radioactive material emits particles at an unknown probabilistic rate \lambda particles per minute. We observe particles emitted at times 1.1, 1.7, 1.3, 2.2, 1.9, and 1.8 minutes. Write the likelihood function \mathcal{L}(\lambda) based on this data. What is the maximum likelihood estimation for \lambda?

Suppose a parameter \theta takes values in [0, 1] with likelihood function \mathcal{L}(\theta) = \sqrt{\theta} - \theta^2. Find the maximum likelihood estimation of \theta.