January 14, 2024
I Made Krisna Gupta (Imed)
Politeknik APP Jakarta, Universitas Indonesia, Center for Indonesian Policy Studies
S3 di Australian National University, S2 di UI/VU Amsterdam
Fokus riset di perdagangan internasional dan kebijakan publik (particularly kebijakan industri)
more at krisna.or.id atau @imedkrisna
Dibuat berdasarkan materi “Introduction to Probability and Statistics” dari ocw.mit.edu oleh Jeremy Orlff dan Jonathan Bloom.
Kontennya sama dengan berbagai standard intro to probability for statistics & econometrics.

slides here
Left out counting and motivation because these are trivial.
Didn’t have time to go through central tendency and variance properly.
Borrow materials from Dr, Uka Wikarya.
Use english and proper notation so you can have a nice transition to VU guys.
Frequentists: probability measures the frequency of various outcomes of an experiment.
Bayesians: probability is an abstract concept that measures a state of knowledge of a degree of belief in a given preoposition.








Most of our tools are developed by frequentists, but increasingly powerful computers lead to the resurgence of bayesians.
Experiment: a repeatable procedure with well-defined possible outcomes.
sample space: the set of all possible outcomes, denoted by sometimes 

fair: all 


Event: a subset of the sample space.
Probability function: a function giving the probability of each outcome.
Experiment: toss the coin, report if it lands heads or tails. Sample space: 























Experiment: toss the coin 3 times, report outcomes. Sample space: 















































Experiment: count the number of taxis that pass UI Salemba during class. Sample space: 



























| Outcome | 0 | 1 | 2 | 3 | ![]() |
k |
|---|---|---|---|---|---|---|
| Probability | ![]() ![]() ![]() |
![]() ![]() ![]() ![]() |
![]() ![]() ![]() ![]() ![]() ![]() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
An event 

For example, using 3 coin experiment, what is the probability of exactly two heads show up?
We can write it as 



















Since we know that 




















A discrete sample space is one that is listable, can be either finite of infinite.





























The interval 




For a discrete sample space 








Rule 1: 







Rule 2: the sum of the probability of all possible outcomes is 1.
Rule 2: if 










































For events A, L and R contained in a sample space 
Rule 1. 











Rule 2. If 

















Rule 3. Inclusion-exclusion principle: if L and R are not disjoint (i.e., overlap), then 






















Conditional probability answers the question ‘how does the proobability of an event change if we have extra information’?


















































































This is called conditional probability, since it takes into account additional conditions.
Rephrase (b) as events: Let 























The conditional probability of A knowing that B has happened is written 





This is read as ‘the conditional probability of A given B’, or ‘the probability of A conditioned on B’, or simply ‘the probability of A given B’.
We can assign a formal definition of conditional probability as such:
Let 



































Let’s redo our previous calculation of 3 heads using this @eq1. Recall that 


































For more complicated events, using @eq1 is often preferred to counting.
From @eq1 we can manipulate the algebra to get the multiplication rule:


















example: Draw two cards from a deck. Using multiplication rule, show that the chance of drawing two spades is 3/51.
Suppose the sample space 
















































































If A is divided into 3 pieces, then 



An urn contains 5 red balls and 2 green balls. We draw 2 balls. What is the probability the second ball is red?
Sample space 

































































under a slightly complex rule, we can’t count on counting.
Suppose if the first draw is green, a red ball is added to the urn, and if the first draw is red, a green ball is added. The first ball isn’t returned. find 


































































Using a probability tree is useful in this type of question.
Two events are independent if knowledge that one occured does not change the probability that the other occurred.
A is independent of B if 










If A is independent of B, then 

























2 events A and B are independent if 















A is independent of B if and only if B is independent of A.
Toss a fair coin twice. 







Toss a fair coin 3 times. Let 



















For two events A and B, Bayes’ rule says






















Bayes’ rule tells us how to ‘invert’ conditional probabilities. In practice, 



It is common to confuse 











Toss a coin 5 times. Let 






































































Consider a routine screening test for a disease. Suppose the frequency of the disease in the population (the base rate) is 0.5%. The test is fairly accurate with 5% false positive rate and 10% false negative rate. You take the test and it comes back positive. What’s the probability you actually get the disease?
Lets define events: 






























































































The complements are true negative and true positive rates, which are:














































You can actually put this in a probability tree.
The question is what’s the probability that you have the disease that your test is positive. i.e., what is the value of 



































We use the law of total probability to compute 






































The answer is something like 8.3%.
This is called “the base rate fallacy” because the base rate of the disease in the population is so low that majority of people taking the test are actually healthy. To summarize:
95% of all tests are accurate does not imply 95% of positive tests are accurate
The base rate fallacy also often calculated using a table
| D+ | D- | total | |
|---|---|---|---|
| T+ | ![]() ![]() ![]() ![]() ![]() |
![]() ![]() ![]() ![]() ![]() |
|
| T- | ![]() ![]() ![]() ![]() ![]() |
![]() ![]() ![]() ![]() ![]() |
|
| total | 50 | 9950 | 10000 |
| D+ | D- | total | |
|---|---|---|---|
| T+ | 45 | 498 | 543 |
| T- | 5 | 9452 | 9457 |
| total | 50 | 9950 | 10000 |
A random variable assigns a number to each outcome in a sample space.
Let 





that takes a discrete set of values. It’s random because its value depends on a random outcome of an experiment.
For any value 










Roll a fair ice twice and record the outcome as 

















































In this game, you win $500 if the sum is 7 and lose $100 otherwise. The payoff function X: 






























The event 





















































The probability mass function (pmf) of a discrete random variable is the function 










always satisfy 
















Let 

| a | 1 | 2 | 3 | 4 | 5 | 6 |
|---|---|---|---|---|---|---|
| pmf p(a): | 1/36 | 3/36 | 5/36 | 7/36 | 9/36 | 11/36 |
The cummulative distribution function (cdf) of a random variable 












| a | 1 | 2 | 3 | 4 | 5 | 6 |
|---|---|---|---|---|---|---|
pmf ![]() ![]() ![]() ![]() ![]() |
1/36 | 3/36 | 5/36 | 7/36 | 9/36 | 11/36 |
cdf ![]() ![]() ![]() ![]() ![]() |
1/36 | 4/36 | 9/36 | 16/36 | 25/36 | 36/36 |















