April 20, 2015

Two Goals a Game… on average

A soccer team scores two goals per game, what is the probability that they will score:

Can we solve this using the binomial formula?

Let's pretend (we'll return to whether this is reasonable in a minute) that this team has 5 trials or attempts a game and has a 40% chance of success in each trial.

\(n = 5, p = 0.4\) \(X =\) # of goals scored (a random variable) \(E[X] = np = 2\) goals

\(P(X = k) = {n \choose k} p^k (1-p)^{n-k}\)

So,

\(P(X = 0) = {5 \choose 0} .4^0 (1-.4)^{5-0} = 0.6^5 =\) 0.07776 \(P(X = 1) = {5 \choose 1} .4^1 (1-.4)^{5-1} =\) 0.2592

The Full Distribution of Probabilities given the 4 attempt assumption

But what if they have 10 attempts?

With 10 attempts

\(n = 10\) \(p = 0.2\) \(E[X] = np = 2\) goals (just as before)

\(P(X = 1) = {10 \choose 1} .2^1 (1-.2)^{1-1} =\) 0.2684355

But what if they have a large number of attempts?

Blue: \(n = 50, p = .04, E[X] = np = 2\)

Red: \(n = 500, p = .004, E[X] = np = 2\)

What does this distribution look like?

Instead of of a number of attempts, \(n,\) and rate of success, \(p,\) we'll think about an expected number of successes \(\lambda.\) and let n go to infinity.

\(P(X = k) = {n \choose k} p^k (1-p)^{n-k}\)

\(p = \frac{\lambda}{n}\)

\(P(X = k) = \lim_{n \to \infty} {n \choose k} (\frac{\lambda}{n})^k (1-\frac{\lambda}{n})^{n-k}\)

We'll break this into four parts:

\(P(X = k) = \frac{\lambda^k}{k!} \cdot A \cdot B \cdot C\)

where \(A =\lim_{n \to \infty} k! \cdot {n \choose k} (\frac{1}{n})^k\) and \(B = \lim_{n \to \infty} (1-\frac{\lambda}{n})^{n}\) and \(C = \lim_{n \to \infty} (1-\frac{\lambda}{n})^{-k}\)

Interlude

Starting with A:

\(A = \lim_{n \to \infty} k! \cdot {n \choose k} (\frac{1}{n})^k\)

\(\lim_{n \to \infty} k! \cdot \frac{n!}{k! (n-k)!} (\frac{1}{n})^k\)

\(\lim_{n \to \infty} \frac{n!}{(n-k)!} (\frac{1}{n})^k\)

\(\lim_{n \to \infty} n \cdot (n-1) \cdot (n-2) \cdot ... \cdot (n-k+1) (\frac{1}{n})^k\)

\(\lim_{n \to \infty} \frac{n \cdot (n-1) \cdot (n-2) \cdot ... \cdot (n-k+1)}{n^k}\)

\(\lim_{n \to \infty} \frac{n}{n} \cdot \frac{n-1}{n} \cdot \frac{n-2}{n} \cdot ... \cdot \frac{n-k+1}{n} = 1 \cdot 1 \cdot 1 \cdot ... \cdot 1 = 1\)

So A just equals 1.

Now part B:

\(B = \lim_{n \to \infty} (1-\frac{\lambda}{n})^n\)

subtitute \(j = -1 \cdot \frac{n}{\lambda}\) and we have

\(B = \lim_{j \to \infty} (1+\frac{1}{j})^{-1 \cdot \lambda j} = \lim_{j \to \infty} [(1+\frac{1}{j})^{j}]^{-1 \cdot \lambda}\)

But what is \(\lim_{j \to \infty} (1+\frac{1}{j})^{j}\) ?

Finally, part C:

So \(B = e^{-\lambda}\)

What about C? Recall, \(C = \lim_{n \to \infty} (1-\frac{\lambda}{n})^{-k}\).

and as \(n \to \infty\) this becomes \(1^{-k}\) or \(\frac{1}{1^k}\) or just 1.

Putting it all together we have:

\(P(X = k) = \frac{\lambda^k}{k!} \cdot 1 \cdot e^{-\lambda} \cdot 1\)

\(P(X = k)= \frac{\lambda^k }{k!} e^{-\lambda}\)

Back to our soccer calculation:

\(P(X = k)= \frac{\lambda^k }{k!} e^{-\lambda}\)

\(\lambda = 2\)

\(P(X = 0)= \frac{2^0 }{0!} e^{-2} = e^{-2}\) = 0.135

\(P(X = 1)= \frac{2^1 }{1!} e^{-2} = 2 e^{-2}\) = 0.271

\(P(X = 2)= \frac{2^2 }{2!} e^{-2} =\frac{4}{2} e^{-2}\) = 0.271

\(P(X = 3)= \frac{2^3 }{3!} e^{-2} = \frac{8}{6} e^{-2}\) = 0.18

\(P(X = 4)= \frac{2^4 }{4!} e^{-2} = \frac{16}{24} e^{-2}\) = 0.09

\(P(X = 5)= \frac{2^5 }{5!} e^{-2} = \frac{32}{120} e^{-2}\) = 0.036

When does this formula work?

\(P(X = k)= \frac{\lambda^k }{k!} e^{-\lambda}\)

For Rare Events when \(p\) is very small or \(n >> k\)

and

rate of successes is constant

Soccer goals and Hockey goals are “rare” relative to the number of plays in the game… but is a teams chance of scoring (per minute) the same across games?

How often will the Rangers defeat team X (ignoring the overtime period)

The Rangers scored 3.0 goals per game and allowed 2.3. Pittsburg scored 2.6 goals per game and allowed 2.5. League Average is about 2.55 goals per game.

We expect the Rangers to score: 3.0 + 2.5 - 2.55 = 2.95 goals per game We expect the Penguins to score: 2.6 + 2.3 - 2.55 = 2.35 goals per game

But what do the distributions look like?

Rangers v. Penguins

Blue (Rangers): \(\lambda = 2.95\) goals per game

Red (Penguins): \(\lambda = 2.35\) goals per game

What about Home Field Advantage

It gives the home team ~0.25 more goals and the road team ~0.25 fewer.

The Rangers scored 3.0 goals per game and allowed 2.3. Pittsburg scored 2.6 goals per game and allowed 2.5. League Average is about 2.55 goals per game.

At home we expect the Rangers to score: 3.0 + 2.5 - 2.55 + 0.25 = 3.2 goals per game

On the road we expect the Penguins to score: 2.6 + 2.3 - 2.55 - 0.25 = 2.1 goals per game

On the road we expect the Rangers to score: 3.0 + 2.5 - 2.55 - 0.25 = 2.7 goals per game

At home we expect the Penguins to score: 2.6 + 2.3 - 2.55 + 0.25 = 2.6 goals per game

Rangers At Home

Blue: \(\lambda = 3.2\) goals per game

Red: \(\lambda = 2.1\) goals per game

Rangers on the Road

Blue: \(\lambda = 2.7\) goals per game

Red: \(\lambda = 2.6\) goals per game