Summations

Theory

Theory 1

In many contexts it is useful to consider random variables that are summations of a large number of variables.

Summation formulas: and

Suppose is a large sum of random variables:

Then:

If and are uncorrelated (e.g. if they are independent):

Extra - Derivation of variance of a sum

Using the definition:

In the last line we use the fact that for the first term, and the symmetry property of covariance for the second term with the factor of 2.

Link to original

Illustration

Example - Binomial expectation and variance

Binomial expectation and variance

Suppose we have repeated Bernoulli trials with .

The sum is a binomial variable: .

We know and .

The summation rule for expectation:

The summation rule for variance:

Link to original

Example - Pascal expectation and variance

Pascal expectation and variance

(1) Let .

Let be independent random variables, where:

  • counts the trials until the first success
  • counts the trials after the first success until the second success
  • counts the trials after the success until the success

Observe that .


(2) Notice that for every . Therefore:


(3) Using the summation rule, conclude:

Link to original

Example - Multinomial covariances

Multinomial covariances

Each trial of an experiment has possible outcomes labeled with probabilities of occurrence . The experiment is run times.

Let count the number of occurrences of outcome . So .

Find .

Solution

Notice that is also a binomial variable with success probability .
(‘Success’ is an outcome of either or . ‘Failure’ is any other value.)

The variance of a binomial is known to be .

Compute by solving:

Link to original

Months with a birthday

Months with a birthday

Suppose study groups of 10 are formed from a large population.

For a typical study group, how many months out of the year contain a birthday of a member of the group? (Assume all 12 months have equal duration.)

Solution

(1) Let be 1 if month contains a birthday, and 0 otherwise.

So we seek . This equals .

The answer will be because all terms are equal.


(2) For a given :

The complement event:


(3) Therefore:

Link to original

Example - Hats in the air

Hats in the air

All sailors throws their hats in the air, and catch a random hat when they fall back down.

(a) How many sailors do you expect will catch the hat they own?

(b) What is the variance of this number?

Solution

Strangely, the answers are both 1, regardless of the number of sailors. Here is the reasoning:

(a)
Let when sailor catches their own hat, and otherwise. Thus is Bernoulli with .

Now counts the total number of hats caught by their owners.

Note that . Therefore:


(b)
We know:


Now calculate :

Use . Observe that . Therefore:


Now calculate :

We need to compute .

Notice that when and both catch their own hats, and 0 otherwise. So it is Bernoulli. Then:

Therefore:


Putting everything together:

Link to original

Central Limit Theorem

Theory

Theory 1

Video by 3Blue1Brown:

IID variables

Random variables are called independent, identically distributed when they are independent and have the same distribution.

IID variables: Same distribution, different values

Independent variables cannot be correlated, so the values taken by IID variables will disagree on all (most) outcomes.

We do have:

Standardization

Suppose is any random variable.

The standardization of is:

The variable has and . We can reconstruct by:


Suppose is a collection of IID random variables.

Define:

where:

So is the standardization of .

Let be a standard normal random variable, .

Central Limit Theorem

Suppose for IID variables , and are the standardizations of .

Then for any interval :

We say that converges in probability to the standard normal .


The distribution of a very large sum of IID variables is determined merely by and from the original IID variables, while the data of higher moments fades away.

The name “normal distribution” is used because it arises from a large sum of repetitions of any other kind of distribution. It is therefore ubiquitous in applications.

Misuse of the CLT

It is important to learn when the CLT is applicable and when it is not. Many people (even professionals) apply it wrongly.

For example, sometimes one hears the claim that if enough students take an exam, the distribution of scores will be approximately normal. This is totally wrong!

Intuition for the CLT

The CLT is about the distribution of simultaneity, or (in other words) about accumulated alignment between independent variables.

With a large , deviations of the total sum are predominantly created by simultaneous (correlated) deviations of a large portion of summands away from their means, rather than the contributions of individual summands deviating a large amount.

Simultaneity across a large of independent items is described by… the bell curve.

Link to original

Illustration

Exercise - Test scores distribution

Test scores distribution

Explain what is wrong with the claim that test scores should be normally distributed when a large number of students take a test.

Can you imagine a scenario with a good argument that test scores would be normally distributed?

(Hint: think about the composition of a single test instead of the number of students taking the test.)

Link to original

Exercise - Height follows a bell curve

Height follows a bell curve

The height of female American basketball players follows a bell curve. Why?

Link to original

Theory - extra

Theory 2

Link to original

Theory

Theory 3

Normal approximations rely on the limit stated in the CLT to approximate probabilities for large sums of variables.

Normal approximation of binomial

Let for IID variables with and .

The normal approximation of is:

For example, suppose , so . We know and . Therefore:

A rule of thumb is that the normal approximation to the binomial is effective when .

Efficient computation

This CDF is far easier to compute for large than the CDF of itself. The factorials in are hard (even for a computer) when is large, and the summation adds another factor to the scaling cost.

Link to original

Illustration

Example - Binomial estimation: 10,000 flips

Binomial estimation: 10,000 flips

Flip a fair coin 10,000 times. Write for the number of heads.

Estimate the probability that .

Solution

(1) Check the rule of thumb: and , so and the approximation is effective.


(2) Now, calculate needed quantities:


(3) Set up CDF:


(4) Compute desired probability:

Link to original

Example - Summing 1000 dice

Summing 1000 dice

Suppose 1,000 dice are rolled.

Estimate the probability that the total sum of rolled numbers is more than 3,600.

Solution

(1) Let be the number rolled on the die.

Let , so sums up the rolled numbers.

We seek .


(2) Now, calculate needed quantities:


(3) Set up CDF:


(4) Compute desired probability:

Link to original

Exercise - Estimating

Estimating S1000

The odds of a random poker hand containing one pair is 0.42.

Estimate the probability that at least 450 out of 1000 poker hands will contain one pair.

Link to original

Exercise - Nutrition study

Nutrition study

A nutrition review board will endorse a diet if it has any positive effect in at least 65% of those tested in a certain study with 100 participants.

Suppose the diet is bogus, but 50% of participants display some positive effect by pure chance.

What is the probability that it will be endorsed?

Answer

Link to original

Deviations

Theory - Tail estimation

Theory 2 - Tail estimation

Every distribution must trail off to zero for large enough . The regions where trails off to zero (large magnitude of ) are informally called ‘tails’.

Tail probabilities

A tail probability is a probability with one of these forms, for any :

Markov’s inequality

Assume that . Take any .

Then the Markov’s inequality states:

Chebyshev’s inequality

Take any , and .

Then the Chebyshev’s inequality states:

Markov vs. Chebyshev

Chebyshev’s inequality works for any , and it usually gives a better estimate than Markov’s inequality.

The main value of Markov’s inequality is that it only requires knowledge of .

Think of Chebyshev’s inequality as a tightening of Markov’s inequality using the additional data of .

Derivation of Markov’s inequality - Continuous RV

Under the hypothesis that and , we have:

On the range we may convert to , making the integrand smaller:

Simplify:

Also:

Therefore:

Extra - Derivation of Chebyshev’s inequality

Notice that the variable is always positive. Chebyshev’s inequality is a simple application of Markov’s inequality to this variable.

Specifically, using as the Markov constant, Markov’s inequality yields:

Then, by monotonicity of square roots:

And of course . Chebyshev’s inequality follows.

Link to original

Illustration

Example - Markov and Chebyshev

Markov and Chebyshev

A tire shop has 500 customers per day on average.

(a) Estimate the odds that more than 700 customers arrive today.

(b) Assume the variance in daily customers is 100. Repeat (a) with this information.

Solution

Write for the number of daily customers.

(a) Using Markov’s inequality with , we have:

(b) Using Chebyshev’s inequality with , we have:

The Chebyshev estimate is much smaller!

Link to original

Theory - Sample mean

Theory 1 - Sample mean

Sample mean and its variance

The sample mean of a set of IID random variables is an RV giving the average value:

Statistics of the sample mean:

The sample mean is typically applied to repeated trials of an experiment. The trials are independent, and the probability distribution of outcomes should be identical from trial to trial.

Notice that the variance of the sample mean limits to 0 as . As more trials are repeated, and the average of all results is taken, the fluctuations of this average will shrink toward zero.

As the distribution of will converge to a PMF with all the probability concentrated at and none elsewhere.

Link to original

Large Numbers

Theory - Law of Large Numbers

Theory 3 - Law of Large Numbers

Let be a collection of IID random variables with for any and for any .

Recall the sample mean:

Law of Large Numbers (weak form)

For any , by Chebyshev’s inequality we have:

Therefore:

Link to original

Illustration

Example - LLN: Average winnings

LLN: Average winnings

A roulette player bets as follows: he wins $100 with probability 0.48 and loses $100 with probability 0.52. The expected winnings after a single round is therefore which equals $4.

By the LLN, if the player plays repeatedly for a long time, he expects to lose $4 per round on average.

The ‘expects’ in the last sentence means: the PMF of the cumulative average winnings approaches this PMF:

This is by contrast to the ‘expects’ of expected value: the probability of achieving the expected value (or something near) may be low or zero! For example, a single round of this game cannot result in a $4 loss.

Link to original

Exercise - Enough samples

Enough samples

Suppose are IID samples of .

(a) Compute and and .

(b) Use the finite LLN to find such that:

(c) How many samples are needed to guarantee that:

Link to original