0% found this document useful (0 votes)
148 views16 pages

MDM4U NOTES Week 5

Download as pdf or txt
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 16

1

DATA MANAGEMENT NOTES


Module 1: Introduction to Probability
Section 1.1: Introduction to Probability Concepts and Notation

Probability: The extent to which an event is likely to occur, measured by the ratio of the favor-
able cases to the whole number of cases possible.

Theoretical Probability: Probability that is calculated without any experiment being performed.
It can be defined as the ratio of the number of favorable outcomes to the total number of possible out-
comes.

P (A): Probability of the set A occuring


n(A): number of favourable outcomes
n(S): number of possible outcomes
n(A)
P (A) = n(S)

Example: Determine the theoretical probability of rolling an even number on a six-sided die.

There are three favourable outcomes. A = {2, 4, 6}. Thus, n(A) = 3 .


There are six possible outcomes. S = {1, 2, 3, 4, 5, 6}. Thus, n(S) = 6
n(A) 3
P (A) = n(S)
= 6
= 12 .

Therefore, the theoretical probability of rolling an even number on a six-sided die is 12 .

Complement of an Event: The event that A does not occur. (The unsuccessful outcomes.)

Complement: A′ , not A, or A complement

As successful outcomes plus unsuccessful outcomes includes all possible outcomes, the theoretical prob-
ability plus the complement equals 1.

P (A) + P (A′ ) = 1
We can rearrange this formula to solve for P (A) and P (A′ ).
P (A) = 1 − P (A′ )
P (A′ ) = 1 − P (A)

Example: Determine the theoretical probability and complement of selecting a king from a standard
deck of cards.

There are 52 cards in a deck, and 4 kings. Thus, the theoretical probability is
n(A) 4 1
P (A) = n(S)
= 52
= 13
.

As the complement is equal to P (A′ ),


P (A′ ) = 1 − P (A) = 1 − 13
1
= 13
13
1
− 13 = 12
13
.
2

12
Thus, the theoretical probability of selecting a non-king is 13
.

Also note that the number of favorable outcomes plus the number of unfavorable outcomes equals the
total number of outcomes. Thus, n(A) + n(A′ ) = n(S).

For instance, from the previous example,


As there are four kings, n(A) = 4.
As there are forty-eight cards that are not a king, n(A′ ) = 48.
Thus, there are n(S) = n(A) + n(A′ ) = 4 + 48 = 52 possible outcomes. (There are 52 cards in a standard
deck.)

Indirect Method
The indirect method is used when probabilities are solved using the complement. This method can be
useful as sometimes it is easier to find the complement than the favorable outcomes.

Example:
Determine the theoretical probability of rolling a multiple of three on a die.

As there are six possible outcomes, n(S) = 6.


As there are four unfavourable outcomes, n(A′ ) = 4.

Thus, as n(S) = n(A) + n(A′ ),


n(A) = n(S) − n(A′ ) = 6 − 4 = 2

Therefore, the probability of rolling a multiple of three on a die is


P (A) = n(A)
n(S)
= 62 = 13 .

Section 1.2: The Law of Large Numbers

Experimental Probability: Probability based on experimental trials.

P (A): probability that outcome A occurs


n(A): number of times that outcome A occured
n(T ): total number of trials
n(A)
P (A) = n(T )

Example: Tracy is the manager of Pizza Hut. The table shows the number of pizza slices ordered
during the lunch rush over several days.

Pizza Type Number of Slices


Pepperoni 98
Hawaiian 48
Vegetarian 51

Determine the experiemental probability that a customer will order Hawaiian pizza.
3

As 48 slices of Hawaiian were sold, n(A) = 48.


As a total of 197 slices where sold, n(T ) = 197. Thus,

P (A) = n(A)
n(T )
48
= 98+48+51 48
= 197 =≈ 24.3%
Therefore, the experimental probability that a customer will order Hawaiian pizza is 24.3%.

Note:
There is an important relationship between experimental probability and theoretical probability. As the
number of trials increases, the experimental probability approaches the theoretical probability. For in-
stance, imagine flipping a coin 1 time, 10 times, 100 times and 1000 times. In theory, there is a 50%
chance of flipping heads. As the trials increase, the experimental results get closer to what we would
expect in theory, 50% of trials being heads.

Example:
Simon flips a coin 50 times and records his results in the table. He flips heads 43 out of the 100 trials.

Heads Tails
17 33

If Simon flipped the coin 1000 times, should Simon expect 430 heads? Explain.

1 50
The theoretical probability of flipping a coin and getting heads is 2
= 100
, where Simon’s experimental
17
probability is 50 =≈ 34%.

No, Simon would very likely have a different experimental probability. As 1000 trials is exhaustive
with only two possiblities, the results will even out. Simon should expect his experimental probability to
approach the theoretical probabiliy of 21 .

Section 1.3: Working with Mutually and Non-Mutually Exclu-


sive Events
Mutually exclusive events: Events that cannot occur simultaneously

Example: Considering a standard deck of cards, let set A be hearts and set B be clubs. When se-
lecting a card from a deck, the card can only have one suit. In the provided Venn diagram, a card can
be a heart or a club, but not both.

Additive Principle (Rule of Sum) for Mutually Exclusive Events


4

P (A orB) = P (A ∩ B) = P (A) + P (B)

The probability of selecting a heart or a club from a deck of cards is given by


P (A ∩ B) = P (A) + P (B) = 1352
+ 13
52
26
= 52 = 12

Non-mutually exclusive events: Different events that can happen at the same time.
Example: Consider set A to be the hearts in a deck of cards and set B to be the kings. When selecting
a card from a deck, the card can be both a heart and a king.

We use the notation A ∩ B as the intersection of the two sets, an element in A and B. As the king of
hearts is in both sets A and B, A ∩ B.

Principle of Inclusion and Exclusion


The Principle of Inclusion/Exclusion is a useful formula when determining probabilities involving non-
mutually exclusive events.
If A and B are non-mutually exclusive events, then the total number of favourable outcomes is:
n(A ∩ B) = n(A) + n(B) − n(A ∪ B)
The probability of A or B is then determined by
P (A ∩ B) = P (A) + P (B) − P (A ∪ B)

Let’s return to our example where set A is hearts and set B is kings. To determine the number of
cards that are a heart or a king, we add the number of cards that are a heart, 13, to the number of
cards that are kings, 4. In doing so, the king of hearts was counted twice, once as a heart, and once
as a king. To account for this, the intersection must be subtracted from the sum. Therefore, there are
13 + 4 − 1 = 16 cards that are either a heart or a king.

The findings in this section are summarized in the following table.


5

Section 1.4: Compound Events and Dependency


Compound Events: Multiple events in a probabilty experiment that may or may not affect each
other. Compound events are created when combining two or more events.

Indepedent Events: Situations in which the occurrence or non-occurence of one event has no in-
fluence on the probability of the other event occuring.

To find the probability of two independent events occuring, A and B, multiply the probability of each
event together.

P (A ∩ B) = P (A) × P (B).

Example: A player wins a game if they roll a 6 on a die and select a red card from a standard deck.
What is the probability that the player will win?

Rolling a six and selecting a red card are independent events as the success of one has no impact
on the success of the other.

Let set A be a six on a die and let set B be red cards in a deck.

As there are six sides to a die and one of them is a six, P (A) = 61 .
26
As there are 52 cards in a deck and 26 are red, P (B) = 52 = 12 .
Thus,

1 1 1
P (A ∩ B) = P (A) × P (B) = 6
× 2
= 12
.

1
Therefore, the player has a 12
chance of winning by rolling a six and selecting a red card.

Dependent Events: The occurance or non-occurence of one event influences the probability of the
other event occuring.

When the outcome of one trial has been determined, then the conditional probability of a subsequent
6

trial can be calcuated based on the result of the first trial. If the first event is A and the second event is
B, then P (A|B) represents the conditional probability that B will occur, given that A has occured.

To calculate the probability of two dependent events, A and B, occuring, multiply the probability that
A occurs by the conditional probability that B occurs, given that A occurred.

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

Example: Two red checkers and two black checkers are placed in a bag. What is the probability
that a red checker is randomly chosen, followed by a second red checker, assuming that the first checker
drawn is not replaced.

These events are dependent as the probability of selecting a second red checker depends on the first
checker being red.

At first, there are two red checkers and two black checkers in the bag. Let P (A) be the probability
of selecting a red checker first. As half of the checkers are red, P (A) = 12 .

Now let P (B|A) be the probability of selecting a second red checker, knowing that the first red checker
was selected and not replaced. As there is one red checker and two black checkers left in the bag, the
chance of selecting a red checker a second time is 13 . Thus, P (B|A) = 13 .

Now to determine the probabiliy of selecting a red checker first and a red checker second (without
replacement), we use the formula

1 1 1
P (A ∪ B) = P (A) × P (B|A) = 2
× 3
= 6

Therefore, there is a one in six chance of selecting two red checkers when the first one is not replaced.
7

Section 2.1: The Slot Method


Example: In the game Rock-Paper-Scissors, two competitors use hand signals to indicate either rock,
paper, or scissors. Consider each competitor as a stage. A tree diagram is used to illustrate the scenario.

a) How many outcomes are possible?

Counting the number of paths, there are 9 possible outcomes.


As there are 9 possible outcomes, n(S) = 9.

b) What is the probability of a tie?

As there are 3 ties, n(A) = 3.


n(A) 3
Thus, P (A) = n(S)
= 9
= 13 .

Fundamental Counting Principle: If one event can occur in m ways, and a second event can occur
in n ways, then together they can occur in m × n ways

The slot method is a strategy that uses the fundamental counting principle. Using this method, we
use slots for each of the number of events.

Example: You roll a standard die. How many outcomes are possible with three rolls?
There are 6 possibilities for the first roll, 6 possibilities for the second roll, and 6 possibilities for the third
roll. Thus, there are 6 × 6 × 6 = 216 different outcomes with three rolls.

Example: Two cards are chosen from a standard deck without replacement. How many possible
outcomes are there?

There are 52 possible cards for the first selection, and then only 51 possible cards for the second se-
lection. Thus, there are 52 × 51 = 2652 possible outcomes when choosing two cards without replacement.

Section 2.2: Factorials


Factorial: A product of sequential natural numbers with the form n! = n(n − 1)(n − 2)... × 2 × 1
8

Example: Determine 5!

5! = 5 × 4 × 3 × 2 × 1

Permutation: An arrangement of n distinct items in a definite order.


There are n ways of selecting the first item, n−1 ways of selecting the second item, n−2 ways of selecting
the third item, and so on, until there is only one way of selecting the last remaining item.

Permutations of r Items Out of n Items: The number of permutations of r items from a col-
lection of n items is

n!
n Pr = n(n − 1)(n − 2)...(n − r + 1) = (n−r)!

Example: There are 5 people on a debate team. Three will be chosen to take part in a debate, in
a given order. In how many ways could the 3 debate team members be selected?

As there is a defined order, this is a permutation.

Method 1: Use the Fundamental Counting Principle


There are three positions to fill.
5 × 4 × 3 = 60 There are 60 ways to select the 3 team members.

Method 2: Use Factorials


As n = 5 and r = 3,
n!
n Pr = (n−r)!
5! 5×4×3×2×1
5 P3 = (5−3)! = 3×2×1
= 5 × 4 × 3 = 60

Thus, there are 60 ways to seleect 3 team members.

Example: A club has 12 members. In how many ways could a president, vice president, treasurer,
and secretary be elected?

As the positions are ordered, this is a permutation.


As n = 12 and r = 4,

12! 12!
12 P4 = (12−4)!
= 8!
= 12 × 11 × 10 × 9 = 11880.

Therefore a president, vice president, treasurer, and secretary can be elected in 11880 ways.

Example: The six members of student council are lined up for a yearbook photo.

As a line up has an order, this is a permutation.

a) In how many ways could the members be lined up?

Since all six people are to be arranged, use a factorial.


6! = 6 × 5 × 4 × 3 × 2 × 1 = 720
9

As n(S) is the total number of ways to arrange the members, n(S) = 6! = 720.

b) In how many ways could this be done if the president and vice president must sit together?

Now consider cases:


n(A) Case 1: President and vice president in the first two spots
2 × 1 × 4 × 3 × 2 × 1 = 48

n(A) Case 2: President and vice president in the next two spots
4 × 2 × 1 × 3 × 2 × 1 = 48

n(A) Case 3: President and vice president in the next two spots
4 × 3 × 2 × 1 × 2 × 1 = 48

n(A) Case 4: President and vice president in the next two spots
4 × 3 × 2 × 2 × 1 × 2 = 48

n(A) Case 5: President and vice president in the last two spots
4 × 3 × 2 × 1 × 2 × 1 = 48

Thus, n(A) = 48 + 48 + 48 + 48 + 48 = 240

Therefore, this can be done 240 ways.

c) In how many ways could this be done if the president and vice president must sit together
in the middle of the group?

There are only one case here.

n(A) Case 1: President and vice president in the middle two spots

4 × 3 × 2 × 1 × 2 × 1 = 48
Thus, this can be done 48 ways.

Indirect Method: Subtract the number of unwanted outcomes from the total number of outcomes.

Example: The six members of student council are lined up for a yearbook photo. How many ways
can the members be arranged if the president and vice president are to not sit together.

The indirect method would be the fastest here as we already established that there are a total of 720
ways to arrange the members without restriction, and that there are 240 ways in which the president and
vice president can sit together. Therefore, there are 720 − 240 = 480 ways the members can be arranged
with the president and vice president not sitting together.

Section 2.3: Introduction to Combinations


Combination: A selection from a group of objects without regard to order.

The number of combinations of r objects chosen from a set of n items is


10

n!
n Pr (n−r)! n!
n Cr = r!
= r!
= (n−r)!r!

Note that the number of combinations is equal to the number of permutations divided by r!. In other
words, the number of combinations is equal to the number of permutations divided by the number of
ways to arrange r objects.

Example: How many ways can a five-card hand be dealt from a standard deck?

This is a combination as order is not important when combining cards to form a hand.

n = 52
r=5

n!
n Cr =
(n − r)!r!
52! 52!
52 C5 = = = 2598960
(52 − 5)!5! (47)!5!

Therefore, a five-card hand can be dealt in 2598960 ways.

Example: A committee of 3 librarians and 3 teachers is formed from a group of 8 librarians and 10
teachers. How many ways are there to form the committee?

This is a combination as the order of the committee members does not matter.

Choose each group of three librarians and three teachers seperately.


Since the two groups are being selected together, the fundamental counting principle applies. We will
multiply the two individual combinations. The use of and tells us to multiply.

Choices for librarians × choices for teachers =8 C3 ×10 C3

8 C3 ×10 C3 = 56 × 120
8 C3 ×10 C3 = 6720

Therefore, committee can be chosen in 6720 ways.

Example: Mint chocolate ice cream, vanilla ice cream, and fudge ice cream are available for dessert.
How many different combinations of ice cream are possible for dessert?

As the order of the ice cream does not matter, this is a combination.
Note that the dessert must have at least one type of ice cream, but could have two types or three. To
solve the problem we must determine the sum of the number of combinations of 1, 2, and 3 types of ice
cream.
11

3! 3! 3!
3 C1 +3 C2 +3 C3 = + +
(3 − 1)!1! (3 − 2)!2! (3 − 3)!3!
3! 3! 3!
= + +
2!1! 1!2! 0!3!
=3+3+1
=7

Therfore, dessert can be made in 7 ways.

Example:
A university task force of 8 people is to be formed from 16 members of the student government and 10
professors. Each person is equally likely to be chosen.

a) What is the probability that there is an equal number of students and professors?

As order of the task force does not matter, this is a combination.

Eight members are chosen, without regard for order, from a total of 26 people.
There are n(S) =26 C8 = 1562275 ways to choose 8 people from 26.

Four students and four professors are chosen. The use of and tells you to multiply.
The number of ways to select four students and four professors is expressed by

n(A) =16 C4 ×10 C4

16 C4 ×10 C4
P (A) = 26 C8
= 0.24464

Thus, the probability that an equal number of students and professors is chosen is approximately 24.4%.

b) What is the probability that at least six members are students?

There could be six, seven, or eight students. The use of or tells you to add by applying the rule of
sum.
Rule of Sum: If one mutually exclusive event can occur in m ways, and a second can occur is n ways,
then one or the other can occur in m + n ways.

n(A) = (16 C6 ×10 C2 ) + (16 C7 ×10 C1 ) + (16 C8 ×10 C0 )


(16 C6 ×10 C2 )+(16 C7 ×10 C1 )+(16 C8 ×10 C0 ) 360360+114400+12870
P (A) = 26 C8
= 1562275
≈ 0.31212

Therefore, the probability that there are at least six students on the task force is approximately 0.31.

Pascal’s Triangle: A triangular array of numbers in which each term is the sum of the two terms
above it. Pascal’s Triangle contains numerous patterns, including those relating to combinatorics and
probability.
12

Each term in Pascal’s triangle corresponds to a value of n Cr . Knowing Pascal’s triangle cuts down
on the time to solve combination problems. Also, each row in Pascal’s triangle combines to 2n .

Example: A small salad bar has 5 items.


a) How many ways can you make a salad?

As order of the salad bar items does not matter, this is a combination.
As there are five items, n = 5.

The salad can have one item, two items, three items, four items, or five items to make a salad. The use
of or tells you to add. Consider cases.

Case 1: Select one salad bar item


Out of the five salad bar items, choose one for the salad: 5 C1
Case 2: Select two salad bar items
Out of the five salad bar items, choose two for the salad: 5 C2
Case 3: Select three salad bar items
Out of the five salad bar items, choose three for the salad: 5 C3
Case 4: Select four salad bar items
Out of the five salad bar items, choose four for the salad: 5 C4
Case 5: Select five salad bar items
Out of the five salad bar items, choose five for the salad: 5 C5

Therefore, there are 5 C1 +5 C2 +5 C3 +5 C4 +5 C5 ways to make the salad.

Using Pascal’s triangle, 5 C1 = 5, 5 C2 = 10, 5 C3 = 10, 5 C4 = 5, and 5 C5 = 1, thus, there are


5 + 10 + 10 + 5 + 1 = 31 ways to make a salad with 5 ingredients.

Alternate Solution
As each row in Pascal’s triangle is equal to 2n , consider 25 = 32. The fifth row in Pascal’s triangle adds
to 32; however, note that 5 C0 must be subtracted. As the salad must have at least one ingredient, the
option of selecting no items is subtracted. Thus, 25 −5 C0 = 25 − 1 = 31.

b) Determine the probability of a random salad having carrots.

n(A) : number of random salads with carrots


n(A′ ) : number of random salads without carrots

Consider the salad with four possible items as carrots are not selected. The number of ways the salad
can be made with up to four items is given by
13

n(A′ ) =4 C1 +4 C2 +4 C3 +4 C4 = 4 + 6 + 4 + 1 = 15
Also note that n(A′ ) = 2n − 1 = 24 − 1 = 16 − 1 = 15.

16
Therefore, n(A) = 31 − 15 = 16 and P (A) = 31
≈ 51.6%.

Thus, there is a 51.6% chance a random salad will have carrots.

Section 2.4: Applying Permutations and Combinations


Example: A total of 500 people enter a draw in which there is a first prize, a second prize, and a
third prize. In how many ways could the prizes be awarded?

Order matters here as there is a first, second and third prize, so this is a permutation.

n(A) = 500 × 499 × 498 = 124251000.


Therefore, there are 124251000 ways the prizes can be awarded.

Example: Before a school dance, students tweeted requests to the DJ for five hip hop, seven R&B,
eight rock and nine pop songs. The DJ will play three requested songs from each genre. How many
different playlists could the DJ generate?

The order of the songs does not matter, so this is a combination.

The use of and tells you to multiply.

n(A) =5 C3 ×7 C3 ×8 C3 ×9 C3 = 10 × 35 × 56 × 84 = 1646400

Therefore, the DJ could generate 1 646 400 different playlists.


14

Module 3: Discrete Probability Distributions


Section 3.1: Representing Probability Distributions

Probability Distribution: The probabilities for all possible outcomes of an experiment or sample
space, often shown as a graph of probability versus the value of a random variable.

When discussing probability distributions, the set X is defined as the the set of all possible out-
comes. Individual values are designated by a lower-case x.

Discrete Random Variable: A variable that can only take on a countable (finite) number of dis-
tinct values.

Example 1: Consider the sum of two dice. The possiblilites are outlined in the table below.

The sum of two dice is an example of a Discrete Random Variable as a finite number of sums
are possible.

Here, the discrete random variable X is the set of possible sums. Thus, X = {2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}.
If a success is a sum of 7, x = 7.

There are 36 ways to roll two dice. The probability of rolling each sum is provided in the table be-
low.
15

Below is the distribution table. Notice the bars are not all the same height, with the tallest bar in the
center. As the bars are not the same height, the distribution is not uniform.

It is easy to see that the sum of 7 is most likely, but is a sum of exactly 7 expected?

Expected Value: Predicted average of all possible outcomes. The expected value, E(x), is equal
to the sum of the products of each outcome, x with its probability, P (x).

n
X
E(X) = xn · P (xn )
x=1

We can also write the formula as

E(X) = x1 · P (x1 ) + x2 · P (x2 ) + x3 · P (x3 ) + ... + xn · P (xn ).


P
The symbol is called sigma and is the symbol for sum.

The expected value of the sum of two dice can be organized in a table, prior to using the formula.
16

Using the formula instead,

n
X
E(x) = xn · P (xn )
x=1
1 2 3 4 5 6 5 4 3 2 1
=2· +3· +4· +5· +6· +7· +8· +9· + 10 · + 11 · + 12 ·
36 36 36 36 36 36 36 36 36 36 36
=7

Example: Holy Trinity is having a fundraising lottery to raise money for the school musical, The Wizard
of Oz. Tickets cost $5 and 3500 tickets are available. There are three levels of prizes: one $5000 grand
prize, two $1000 second prizes, and three $500 prizes. What is the expected value of each ticket?

E(X) = x1 · P (x1 ) + x2 · P (x2 ) + x3 · P (x3 ) − price per ticket


1 2 3
= 5000 · + 1000 · + 500 · −5
3500 3500 3500
5000 2000 1500 17500
= + + −
3500 3500 3500 3500
−9000
=
3500
≈ −2.57

Therefore, the expected value per ticket is $-2.57.

You might also like