Probability
Introduction to Probability,
Conditional Probability
Why do we need Probability?
• We have several graphical and numerical statistics for summarizing our data
• We want to make probability statements about the significance of our statistics
• Eg. In Stat111, mean(height) = 66.7 inches
• What is the chance that the true height of the university’s students is between 60 and 70 inches?
• Eg. r = -0.22 for draft order and birthday
Deterministic vs. Random Processes
• In deterministic processes, the outcome can be predicted exactly in advance
• Eg. Force = mass x acceleration. If we are given values for mass and acceleration, we exactly know the value of force
• In random processes, the outcome is not
known exactly, but we can still describe the
probability distribution
of possible outcomesSample Space
• The sample space S of a random process is
the set of all possible outcomes Example: one coin toss
S = {H,T}
Example: three coin tosses
S = {HHH, HTH, HHT, TTT, HTT, THT, TTH, THH}
Example: roll a six-sided dice
S = {1, 2, 3, 4, 5, 6}
Example: Pick a real number X between 1 and 20
Events
• An event is an outcome or a set of outcomes of a random process
Example: Tossing a coin three times
Event A = getting exactly two heads = {HTH, HHT, THH}
Example: Picking real number X between 1 and 20
Event A = chosen number is at most 8.23 = {X ≤ 8.23}
Example: Tossing a fair dice
Combinations of Events
• The complement Ac of an event A is the event that A
does not occur
• The union of two events A and B is the event that either A or B or both occurs
• The intersection of two events A and B is the event that both A and B occur
Equally Likely Outcomes Rule
• If all possible outcomes from a random process have the same probability, then
• P(A) = (# of outcomes in A)/(# of outcomes in S)
• Examples: One Dice Tossed, find P(A) if: A: the outcome is even number
A: the outcome does not equal 6
• Examples: Two coins tossed, find P(A) if: A: the outcome contains at least one head
Probability Rules
•
P(S) = 1
•
0 ≤ P(A) ≤ 1 for any event A
•
P(A
c) = 1 - P(A)
• Examples: Two coins tossed, find P(A) if: A: the outcome contains at least one head
Disjoint Events
• Two events are called disjoint if they can not
happen at the same time
• Events A and B are disjoint means that the intersection of A and B is zero
• Example: coin is tossed twice
• S = {HH,TH,HT,TT}
• Events A={HH} and B={TT} are disjoint
• Events A={HH,HT} and B = {HH} are not disjoint
•
Rule 4:
Independent events
• Events A and B are independent if knowing that A occurs does not affect the probability that B occurs
• Example: tossing two coins
Event A = first coin is a head Event B = second coin is a head
• Disjoint events cannot be independent!
• If A and B can not occur together (disjoint), then knowing that A occurs does change probability that B occurs
• Probability Rule 5: If A and B are independent P(A and B) = P(A) x P(B)
Independent
• Example 1:
A- Tossing one dice and one coin, find the following: • 1- The sample space
• 2-The event A: the dice is even number and the coin is a head
• 3- P(A)
B- If A and B are two events where P(A)=0.3, P(B)=0.4, and P(A∩B)=0.12,
• Example 2 Suppose you roll a red and a green dice. Find
1. P(sum is 4)
2. P(sum is at most 4)
6. P(the red dice shows a 6)
7. P(both dice show 6)
8. P(sum of dice exceeds 1)
9. P(sum of dice exceeds 12)
Definition: Conditional Probability
• Let A and B be two events in sample space. The
conditional probability that event B occurs
given
that event A has occurred
is:Independent vs. Non-independent Events
• If A and B are independent, then
P(
A and B
) = P(A
) x P(B
)which means that conditional probability is:
P(B | A) = P(A and B) / P(A) = P(A)P(B)/P(A) = P(B)
• We have a more general multiplication rule for
events that are not independent:
Random variables
• A random variable is a numerical outcome of
a random process or random event
• Example: three tosses of a coin
• S = {HHH,THH,HTH,HHT,HTT,THT,TTH,TTT}
• Random variable X = number of observed tails
• Possible values for X = {0,1, 2, 3}
• Why do we need random variables?
Discrete Random Variables
• A discrete random variable has a finite or
countable number of distinct values
• Discrete random variables can be summarized by listing all values along with the probabilities
• Called a probability distribution
• Example: number of members in US families
x 2 3 4 5 6 7
Another Example
• Random variable X = the sum of two dice
• X takes on values from 2 to 12
• Use “equally-likely outcomes” rule to calculate the probability distribution:
• If discrete r.v. takes on many values, it is
better to use a probability histogram
x 2 3 4 5 6 7 8 9 10 11 12
# of
Outcomes 1 2 3 4 5 6 5 4 3 2 1
Probability Histograms
• Probability histogram of sum of two dice:
• Using the disjoint addition rule, probabilities for discrete random variables are calculated by adding up the “bars” of this histogram:
Another Example
• Example:
Random variable X = the number of heads in tossing two coins, find the probability distribution and
histogram
x
Example: find the expected sum for rolling two dice
X = sum of two dice
x 2 3 4 5 6 7 8 9 10 11 12 P(X=x
Example: find the variance for the sum of two dice
X = sum of two dice
x 2 3 4 5 6 7 8 9 10 11 12 P(X=x