Professional Documents
Culture Documents
Week 2
Probability theory.
Compulsory reading: Chapter 16 (pp. 297 - 318)
Test on the next week
• During the next class you will have to do the first minor test
• It will be about the variable types!
• You can earn 20 scores on these minor tests
• The test will last 45 minutes in the second half of the class, we will
begin with a practice session
Practice
1. Brand of your mobile phone (Apple/Samsung/Huawei/HTC/etc.)
2. Time spent with gaming on an average day (0 hour/1-3 hours/3-6 hours/more than 6 hours)
3. Body temperature on Celsius-scale
4. Preferred speed when cycling in km/hour
5. Monthly average amount of spendings in EUR
6. Most frequently used application
7. Trust towards government on a scale ranging from 0 to 10 (0=no trust at all, 10=complete trust)
8. Time when going to bed on an average weekday (hh:mm)
9. Frequency of smoking (several times a day/once a day/several times a week/once a week/less often)
10. Color of the wall in your room
11. Number of acquaintances infected with COVID-19
12. Date of birth (year)
13. Have you voted on the last parlamentary elections? (yes/no)
Practice
1. Brand of your mobile phone (Apple/Samsung/Huawei/HTC/etc.)
2. Time spent with gaming on an average day (0 hour/1-3 hours/3-6 hours/more than 6 hours)
3. Body temperature on Celsius-scale
4. Preferred speed when cycling in km/hour
5. Monthly average amount of spendings in EUR
6. Most frequently used application
7. Trust towards government on a scale ranging from 0 to 10 (0=no trust at all, 10=complete trust)
Time when going to bed on an average weekday (hh:mm)
8. Frequency of smoking (several times a day/once a day/several times a week/once a week/less often)
9. Color of the wall in your room
10. Number of acquaintances infected with COVID-19
11. Date of birth (year)
12. Have you voted on the last parlamentary elections? (yes/no)
Probability theory
• “It probably will rain tomorrow afternoon.”
• “It is very likely that the plane will arrive late.”
• “The chances are good that he will be able to join us for dinner this
evening.”
Life is full of uncertainty, but certain events are more likely to occur
than others, and that’s where probability theory comes into play.
Probability lets you predict the future by assessing how likely outcomes
are, and knowing what could happen helps you make informed
decisions.
Probability theory
Probability has found applications in areas such as
1 E1
S ={E1, E2, E3, E4, E5, E6}
2 E2
S
3 E3 •E1 •E3
4 E4 •E5
5 •E2 •E6
E5 •E4
6 E6
12
Probability theory – event and sample space
Example – experiment: the coin toss
13
Probability theory – probability
• What are the chances?
• Have you ever been in a situation where you’ve wondered: ‚Now,
what were the chances of that happening?’
• Probability is a way of measuring the chance of something happening
(based on how often do they happen)
• The probability of an event A measures “how often” A will occur. We
refer to this probability by P(A)
Probability theory – probability
Suppose that an experiment is performed n times. The relative
frequency for an event A is
P(A)=
You can use it to indicate how likely an occurrence is.
Probability theory – probability
• In stats-speak, an event is any occurrence that has a probability
attached to it – in other words, an event is any outcome where you
can say how likely it is to occur.
• Probability is measured on a scale of 0 to 1.
• If an event is impossible, it has a probability of 0. If it’s an absolute
certainty, then the probability is 1. A lot of the time, you’ll be dealing
with probabilities somewhere in between.
Probability theory – laws of probability
Probability theory – laws of probability
• For an event A, A’ is the complement of A; A’ is everything in S that is
not in A.
• P(A’ ) = 1 - P(A)
S
A'
A
Probability theory – recap from the set theory
Unions and intersections
S AÇB
A B
AÈB
Probability theory – laws of probability
• Mutually exclusive events: no outcomes from S in common
• If A and B are disjoint events, then
P(A B) = P(A) + P(B)
( A cup B / A join B / A union B )
AÇB=Æ
S
A
B
Probability theory – laws of probability
General Addition Rule:
for any two events A and B
P(A B) = P(A) + P(B) – P(A B)
Probability theory – laws of probability
Example
Experiment: toss a fair die once
• S = {1, 2, 3, 4, 5, 6}
• A = even appears = {2, 4, 6}
• B = 3 or fewer = {1, 2, 3}
• P(A È B) = P(A) + P(B) - P(A Ç B)
=P({2, 4, 6}) + P({1, 2, 3}) - P({2})
= 3/6 + 3/6 - 1/6 = 5/6
Probability theory – laws of probability
Summary
• 1. 0 P(A) 1 ( for any event A )
• 2. P() = 0, P(S) = 1
• 3. P(A’) = 1 – P(A)
• 4. If A and B are disjoint events, then
P(A B) = P(A) + P(B)
• 5. For any two events A and B,
P(A B) = P(A) + P(B) – P(A B)
Probability theory – law of large numbers
As the number of observations increases, the ratio of observing event A
compared to all observations, tends to a certain number
P(Heads):