Probability

[Mutually exclusive events]


The occurance of one prevents the other from happening
If A happe, B will never happen
P(A) × P(B) = P(B) × P(A | B)
e.g
Drawing an ace and a King
If we draw a card, it can either be ace or king.
It cant be both

1) Addition rule
The probability that either A or B occurs is the sum of the individual probability of A and B occuring
Sum of the individual probability of A and B occuring
P(A or B) = P(A) + P(B)
where A and B are mutually exclusive

2) Complement Rule
Probability of an event not happening is 1 minus probability of it happening

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

3) Exclusive rule
P(A and B) = 0

[Independant Event]
If the occurrence of Event A does not affect the probability of occurrence of event B, A and B are independent events.

1) Multiplication Rule
For two independent events A and B, the probability that A and B occurring at the same time is the product of the individual probabilities of A and B occurring.

P(A and B) = P(A) * P(B)

[Average values]

To see the possible winning amount in the long run
Average value (Mean) = V(A)×P(A) +V(B)×P(B)  
V(A) => the value of positive
P(A) => Probability of positive
V(B) => the value of negative
P(B) => Probability of Negative

[P-value]

The  sum of probabilities namely:
- Current
- Equal extreme
- More extreme

For example:
Someone claimed that out of 7 coin toss, he wins 6 times in a row using a fair coin.
To calculate the p-value, we sum the different probabilities
1. Current
wwwwwwl
-> P(win) + P(Lose)
-> (1/2)^6 + (1/2)
2. Extreme equal
wlwwwww
lwwwwww
wwlwwww
wwwlwww
wwwwlww
wwwwwlw
There are 6 other possibilities thus,
sum all the probability for all of the cases
-> ((1/2)^6 + (1/2) ) * 6
-> We can multiply by 6 because it just so happen that it is the same prbability for win or loose
3. More extreme
The extreme would be when he win all
wwwwwww
-> (1/2)^7

The P-value is (1/2)^7 * 8

if the pvalue is < 0.05 we reject the null hypothesis
> we accept the null hypothesis

Null hypothesis is the statement where we declare that the two variables does not affect each other or the game is fair.
In this case, the null hypothesis is the game is not rigged



As the sample size increases, the p-values decreases.

[Conditional Probability]




If event A and B are dependent events
The deck is missing a king spade,
drawing a king, probability of drawing a heart is 1/3 for king
but if drawing other cards, probability of a heart is 1/4 for the specific card

P(A) × P(B) = P(B) × P(A | B)

P(A) is not equal to P(A|B)
P(A|B) probability of A among B

If event A and B are independent events
e.g
Getting an ace and getting a heart
if we draw a card, even if we dont get ace we can still get a heart.

P(AB) = P(A) × P(B)
Probability of A and B happen is the product of the probability of A and B

P(A) × P(B) = P(B) × P(A | B)


P(A) = P(A | B)

[Testing rare events]


How likely you have the disease given your tested positive?

Imagine a test of a rare disease

How accurate is the result?
Testing for diseases
Table:
Test positive Test negative
Have disease TRUE POSITIVE FALSE NEGATIVE
No disease FALSE POSITIVE TRUE NEGATIVE


Sensitivity -> P(Positive | actual positive)
= True positive / Have disease

Specificy-> P(neg | Actual negative)
=True neg / No disease


Base rate -> Actual percentage of people with disease
P(Have disease ) = (True Postive + False Negative) / Population size


What we want: P(Event happening | event suspected)


Tutorial Notes
<Prev Sampling                                                                                     Next QR Framework>

No comments:

Post a Comment