Table of Contents

Calculating Probability

Roulette
Real roulette image

How many pockets (holes) are there? 38

diverse betting methods

. . .

7 out of 38 possible outcome

$$P(A) = \frac {n(A)}{n(S)} $$

Probability of event A happening:
S = space S
A = event A

7이 일어나는 경우
일반화

$$ P(A) + P(A') = 1 $$
$$ P(A') = 1 - P(A) $$

$ P(9) $
$ P(Green) $
$ P(Black) $
$ P(38) $

\begin{eqnarray*} P(\text{Green}) & = & 2 / 38 \\ & = & 0.052632 & = & 0.053 \end{eqnarray*}

\begin{eqnarray*} P(\text{Black or Red}) & = & P(\neg{\text{Green}}) \\ & = & 1 - P(Green) \\ & = & 1 - 0.053 \\ & = & 0.947 \end{eqnarray*}

\begin{eqnarray*} P(\text{Black or Red}) & = & P(\text{B} \cup \text{R}) \\ & = & P(B) + P(R) \\ & = & \frac {18 + 18} {38} \\ & = & \frac {36}{38} \\ & = & 0.947 \end{eqnarray*}

{{:b:head_first_statistics:pasted:20190924-180111.png}}
{{:b:head_first_statistics:pasted:20190924-180227.png}}
{{:b:head_first_statistics:pasted:20190924-180416.png}}

Let’s find the probability of getting a black or even (assume 0 and 00 are not even).

  1. What’s the probability of getting a black? $ P(B) $
  2. What’s the probability of getting an even number? $ P(E) $
  3. What do you get if you add these two probabilities together? $ P(B \cap E) $
  4. Finally, use your roulette board to count all the holes that are either black or even, then divide by the total number of holes. What do you get? $P(B \cup E)$

음영으로 해당 영역을 표시하시오.


$P(A \cap B) + P(A \cap B')$

$ P(A' \cap B') $

$ P(A \cup B) - P(B) $

probability of A given B

$ P(A \mid B) $ : The probability of A given that we know B has happened

\begin{eqnarray*} & & P(A \mid B) = \displaystyle \frac {P(A \cap B)}{P(B)} \\ & & P(B \mid A) = \displaystyle \frac {P(B \cap A)}{P(A)} \\ & & P(A \cap B) = P(A \mid B) * {P(B)} \\ & & P(B \cap A) = P(B \mid A) * P(A) \\ \\ & & \text{since},\;\; P(A \cap B) = P(B \cap A) \\ & & P(A \vert B) * {P(B)} = P(B \vert A) * P(A) \\ \end{eqnarray*}

Because we’re trying to find the probability of A given B, we’re only interested in the set of events where B occurs.

Note that
\begin{eqnarray*} P(A \vert B) & = & \frac {\text{black}}{\text{black + grey}} \\ & = & \frac {P(A \cap B)}{P(B)} \end{eqnarray*}

\begin{eqnarray*} P(A \cap B) & = & {\text{black}} \end{eqnarray*}

[ ]
[ ]

….

Probability magnet

Duncan’s Donuts are looking into the probabilities of their customers buying donuts and coffee. They drew up a probability tree to show the probabilities, but in a sudden gust of wind, they all fell off. Your task is to pin the probabilities back on the tree. Here are some clues to help you.

3/4, 1/4, 2/5, 3/5, 1/3, 2/3

[Donuts Buying at Doncun ]
[Probability, conditional ]

  • P(Donuts')
  • P(Donuts' ∩ Coffee)
  • P(Coffee' | Donuts)
  • P(Coffee)
  • P(Donuts | Coffee)
 d (3/4) --  c [x = 3/5] [k = p(c and d)]
         -- ~c [y = 2/5]
~d (1/4) --  c (1/3) --> [a = p(c and ~d)]
         -- ~c [2/3]

x * 3/4 = p(d and c) = 9/20
x = 9/20 * 4/3
  = 36/60
  = 6/10 = 3/5

P(~d ∩ c) = a = 1/4 * 1/3 = 1/12
P(c) = k + a 
k = 3/4 * 3/5 = 9/20
a = 1/12 
P(c) = 54/120 + 10/120 = 64/120 = 16/30 = 8/15

c (8/15) -- d  [j]  [P(d and c) = 9/20]
         -- ~d
~c (7/15) 

j = p(d | c)
p(d and c) = 9/20 이므로
8/15 * j = 9/20 
j = 9/20 * 15/8 = 9/4 * 3/8 = 27/32

Q: I still don’t get the difference between P(A ∩ B) and P(A | B).
A: P(A ∩ B) is the probability of getting both A and B. With this probability, you can make no assumptions about whether one of the events has already occurred. You have to find the probability of both events happening without making any assumptions. P(A | B) is the probability of event A given event B. In other words, you make the assumption that event B has occurred, and you work out the probability of getting A under this assumption.

Q: So does that mean that P(A | B) is just the same as P(A)?
A: No, they refer to different probabilities. When you calculate P(A | B), you have to assume that event B has already happened. When you work out P(A), you can make no such assumption.

Q: Is P(A | B) the same as P(B | A)? They look similar.
A: It’s quite a common mistake, but they are very different probabilities. P(A | B) is the probability of getting event A given event B has already happened. P(B | A) is the probability of getting event B given event A occurred. You’re actually finding the probability of a different event under a different set of assumptions.

Q: Are probability trees better than Venn diagrams?
A: Both diagrams give you a way of visualizing probabilities, and both have their uses. Venn diagrams are useful for showing basic probabilities and relationships, while probability trees are useful if you’re working with conditional probabilities. It all depends what type of problem you need to solve.

Q: Is there a limit to how many sets of branches you can have on a probability tree?
A: In theory there’s no limit. In practice you may find that a very large probability tree can become unwieldy, but you may still find it easier to draw a large probability tree than work through complex probabilities without it.

Q: If A and B are mutually exclusive, what is P(A | B)?
A: If A and B are mutually exclusive, then P(A ∩ B) = 0 and P(A | B) = 0. This makes sense because if A and B are mutually exclusive, it’s impossible for both events to occur. If we assume that event B has occurred, then it’s impossible for event A to happen, so P(A | B) = 0.

Swap the order of buying. What do you get?

...

Maybe we can win some chips back with another bet. This time, the croupier says that the ball has landed in an even pocket. What’s the probability that the pocket is also black?

$$ P(Black \vert Even) = \frac {P(Black \cap Even)}{P(Even)} $$

Step 1: Finding P(Black ∩ Even)
\begin{eqnarray*} P(Black \cap Even) & = & \frac {18}{38} * \frac {10}{18} \\ & = & \frac {10}{38} \\ P(Black \vert Even) & = & \frac {P(Black \cap Even)}{P(Even)} \\ P(Black \cap Even) & = & P(Black) * P(Even \vert Black) \\ P(Black \vert Even) & = & \frac{P(Black) * P(Even \vert Black)} {P(Even)} \end{eqnarray*}

Step 2: Finding P(Even)

\begin{eqnarray*} P(Even) & = & P(Black \cap Even) + P(Red \cap Even) \\ & = & P(Black) * P(Even \vert Black) + P(Red) * P(Even \vert Red) \\ & = & \frac{18}{38} * \frac{10}{18} + \frac{18}{38} * \frac{8}{18} \\ & = & \frac{18}{38} \\ & = & \frac{9}{19} \end{eqnarray*}

Step 3: Finding P(Black l Even)

$$ P(Black \vert Even) = \frac {P(Black \cap Even)} {P(Even)} $$
We started off by finding an expression for P(Black ∩ Even)

\begin{eqnarray*} P(Black \cap Even) & = & P(Even \cap Black) \\ & = & P(Black) * P(Even \vert Black) \end{eqnarray*}
After that we moved on to finding an expression for P(Even), and found that

$$ P(Even) = P(Black) * P(Even \vert Black) + P(Red) * P(Even \vert Red) $$
Putting these together means that we can calculate P(Black | Even) using probabilities from the probability tree

\begin{eqnarray*} P(Black \vert Even) & = & \frac {P(Black \cap Even)}{P(Even)} \\ & = & \frac { P(Black) * P(Even \vert Black)}{P(Black) * P(Even \vert Black) + P(Red) * P(Even \vert Red)} \\ & = & \frac{5}{19} / \frac{9}{19} \\ & = & \frac{5}{19} * \frac{19}{9} \\ & = & \frac{5}{9} \\ \end{eqnarray*}

Think backward again

Draw a tree line for Odd, Even, Green probability first, then Black and White.

Bayes' Theorem

Bayes' Theorem

Generalization

Bayes' Theorem

\begin{eqnarray*} & & P(A \mid B) = \frac {P(A \cap B)}{P(B)} \\ & & P(A \cap B) = P(B) * P(A \mid B) \\ & & P(B \cap A) = P(A) * P(B \mid A) \\ \\ & & \therefore & & \\ & & P(A \cap B) = P(A) * P(B \mid A) \\ \\ & & \therefore \\ & & P(A \mid B) = \frac {P(A) * P(B \mid A)} {P(B)} \\ \\ & & \text{also, } \because{} \\ & & P(B) = P(A) * P(B \mid A) + P(\neg{A}) * P(B \mid \neg{A}) \\ & & P(A \mid B) = \frac {P(A) * P(B \mid A)} {P(A) * P(B \mid A) + P(\neg{A}) * P(B \mid \neg{A})} \\ \end{eqnarray*}
This is called “Bayes' Theorem

e.g.

The Manic Mango games company is testing two brand-new games. They’ve asked a group of volunteers to choose the game they most want to play, and then tell them how satisfied they were with game play afterwards. 80 percent of the volunteers chose Game 1, and 20 percent chose Game 2. Out of the Game 1 players, 60 percent enjoyed the game and 40 percent didn’t. For Game 2, 70 percent of the players enjoyed the game and 30 percent didn’t. Your first task is to fill in the probability tree for this scenario.

Manic Mango selects one of the volunteers at random to ask if she enjoyed playing the game, and she says she did. Given that the volunteer enjoyed playing the game, what’s the probability that she played game 2? Use Bayes’ Theorem.

Dependent and Independent event

$P(E|B) = 10 /18$
$P(E) = 18 / 38$

if $P(E|B) \ne P(E)$ true,
then the two events are dependent.

$P(B) = 18 / 38$
$P(B|B) = 18 / 38$

If $P(A|B) = P(A)$ is true,
then the two events are independent.

$ P(\text{A} \vert \text{B}) = \displaystyle \frac {P(\text{A} \cap \text{B})}{P(\text{B})} $ 이므로

그리고, 만약에 위가 참이라면
$ P(A) = \displaystyle \frac {P(A \cap B)}{P(B)} $

따라서,
$ P(A \cap B) = P(A) * P(B) $

The Absent-Minded Diners
Three absent-minded friends decide to go out for a meal, but they forget where they’re going to meet. Fred decides to throw a coin. If it lands heads, he’ll go to the diner; tails, and he’ll go to the Italian restaurant. George throws a coin, too; heads, it’s the Italian restaurant; tails, it’s the diner. Ron decides he’ll just go to the Italian restaurant because he likes the food.

  1. What’s the probability all three friends meet?
  2. What’s the probability one of them eats alone?
{{:b:head_first_statistics:pasted:20250922-074827.png}}
  • The probability of the ball having landed on the number 17 given the pocket is black.
  • The probability of the ball landing on pocket number 22 twice in a row.
  • The probability of the ball having landed in a pocket with a number greater than 4 given that it’s red.
  • The probability of the ball landing in pockets 1, 2, 3, or 4.
Black = black, Dark grey = red, grey = green

exercises

1

https://youtu.be/NIqeFYUhSzU?t=904
아미라와 재인은 지각을 할 때가 있다. 전체 기간 중에는 70%는 둘 다 지각하지 않고 학교에 등교를 한다. 전체 기간 중에 아미라는 20% 지각을 하고 재인은 25% 지각을 한다. 지난 주 월요일에 재인은 지각을 했다. 아미라가 지각할 확률을 구하라.

2

https://youtu.be/NIqeFYUhSzU?t=1296
타냐는 테니스치는 것을 좋아하는데, 날씨가 좋을 때는 특히 즐겨 친다. 날씨가 좋을 때 타냐가 테니스를 치는 확률은 80%이고 날씨가 좋지않을 때는 35% 이다. 특정한 날에 날씨가 좋을 확률은 60%라고 한다. 지난 일요일에 타냐는 테니스를 쳤다. 이날 날씨가 좋았을 확률은 어떻게 되는가?

3

불경기 대 톰은 직업을 잃을 확률이 40% 이다. 보통 때는 5%이다.
해마다 불경기가 올 확률은 10% 라고 한다.
작년에 톰은 직업을 읽었다. 이 때 불경기였을 확률은 얼마인가?

4

https://youtu.be/NIqeFYUhSzU?t=2550

5

Question

6

Question