You are on page 1of 49

AMA1110 Basic Mathematics I - Calculus and

Probability & Statistics


Lecture 8
29 October 2019

Dr. Guofeng Zhang

Email: guofeng.zhang@polyu.edu.hk
Office: TU832
Telephone: 2766 6936
Student Consultation Hours: Tue. 13:00–15:00

1 / 49
Outline

Why Probability and Statistics


Three Conceptual Approaches to Probability
Counting Rules
Venn Diagram and Basic Probability Laws

2 / 49
Why Probability and Statistics

• Statistics is the corner stone of information science.


• It deals with the extraction of information from data.
• It explains and predicts the model of uncertainty.
• The explanation helps us understand how the nature works.
• The prediction helps us make decisions.
• Statistics has revolutionized virtually all areas of scientific
investigation in the 20th century, including: physics, chemistry,
biology, sociology, economics, etc, etc...
• It has been becoming even more important in the past two
decades, thanks to the wide application of computers and high
throughput experimental techniques.

3 / 49
Example 1. Insurance industry

• How does a company decide premium for an insurance policy?


• For medical insurance, how to decide the premium for a person
that does or dose not smoke?
• We need statistics!

4 / 49
Example 2. Google, Facebook, Amazon, and etc

• “[W]e create as much information in two days now as we did from


the dawn of civilization through 2003.” —Eric Schmidt in 2010.
• That’s approximately 5 billion GB per two days, and that’s in 2010.
• Searching: input a key word, output a ranked list of web pages
• How to adapt? What if most of the people click the second, not
the top link?
• Amazon: what might the user need? How to place ads effectively?
• We need statistics!

5 / 49
Example 3. Statistical arbitrage and high frequency trading

• As reported recently, US high frequency traders switched from


fiber-optic cable to microwave, saving almost half of the time
conveying data.
• Patterns of deviation from equilibrium are detected very quickly
so as to create arbitrage opportunity in the next few seconds.
• We need statistics!

6 / 49
The age of Big Data is coming!

• The age of big data is coming, bringing about positive or negative


changes to our living place.
• It is the development of new technologies that makes the
generating, storing, transporting and processing of huge amount of
data possible.
• It is statistics that makes sense of the data.
• “For Today’s Graduate, Just One Word: Statistics.” —New York
Times Aug 6, 2009
• A challenging but interesting age is upon us.

7 / 49
Experiments

Definition (10.1.1)
An experiment is defined to be any process which randomly generates
outcomes.

Experiment Outcomes
Toss a coin Head, Tail
Roll a die 1,2,3,4,5,6
Play a football game win, lose, tie

1 First, each single repetition of the experiment generates one and


only one outcome.
2 Second, the outcome is random, in other words, different
repetitions of the experiment may generate different outcomes.

8 / 49
Sample space

Definition (10.1.3)
Given an experiment, the sample space S is defined as the set of all the
possible outcomes. Any particular outcome is referred to as a sample
and is an element of the sample space S.

Definition (10.2.1)
Given an experiment, an event is a collection of one or more of the
possible outcomes, namely, a subset of the sample space S.

Usually an event is denoted by a capital letter such as A, B, C, etc..

9 / 49
Example: Rolling a die

• Sample space: S = {1, 2, 3, 4, 5, 6}


• In a specific experiment, one has a sample (namely, an outcome),
for example, “x = 3”.
• Examples of events (namely, subsets of S): {1}, “faces with odd
numbers”={1, 3, 5}, “all the faces”={1, 2, 3, 4, 5, 6} = S.
• We have: x 6∈ {1}, x ∈ {1, 3, 5}, and x ∈ {1, 2, 3, 4, 5, 6}.
• If the die is fair, in other words, all faces show up equally likely,
then we know that the “probability” of {1} is 1/6, that of {1, 3, 5}
is 1/2, and that of {1, 2, 3, 4, 5, 6} is 1.

10 / 49
Example
An experiment consists of flipping a coin three times and each time
noting whether it lands head or tail.
(a). What is the sample space of this experiment?
(b). What is the event that tails occur more often than heads?

Solution:

11 / 49
The precise definition of Probability
Definition (10.3.1)
Probability is a numerical measure of the likelihood that a specific
event occurs in an experiment.

The meaning of “a specific event occurs in an experiment”: When an


experiment is being performed, one and only one outcome will show
up. If this outcome belongs to a specific event, we say that this specific
event occurs in the experiment performed.

Let A be an event. The probability that the event A occurs is denoted


by P (A).
Two axioms of Probability
• 0 ≤ P (A) ≤ 1. When 0 = P (A), the event A cannot happen;
when P (A) = 1, the event will happen for sure.
• Let S be the sample space. Then P (S) = 1.
12 / 49
Three Conceptual Approaches to Probability

Probability theory is abstracted mainly from three concepts. We now


take a brief review on these ideas.

1. “Classical Probability”. Based on the observations of experiments


that produce outcomes that have equal probability, in other words, all
possible outcomes occur equally likely. For example, tossing a die,
flipping a coin.
Classical Probability Rule
The probability that the event A occurs is defined to be
Number of outcomes that belong to event A
P (A) = .
Total number of outcomes

13 / 49
Example
Find the probability of obtaining an even number in one roll of a fair
die.
Solution:
6 outcomes: 1, 2, 3, 4, 5, 6 (which occur equally likely)
Let A be the event that an even number is observed on the die. So
A = {2, 4, 6}, and whose probability is
3 1
P (A) = = .
6 2

14 / 49
2. “Relative Frequency Concept of Probability”.
Relative Frequency as an Approximation of Probability
If an experiment is repeated n times and an event A is observed f
times, then the relative frequency is used to approximate the
probability, i.e.,

f
P (A) ≈ .
n

15 / 49
Example
10 of the 500 randomly selected cars manufactured at a certain auto
factory are found to be defective.
Assuming that the defective cars are manufactured randomly, what is
the probability that the next car manufactured at this auto factory is
defective?
Solution:

16 / 49
Law of Large Numbers

If we repeat one experiment N times, then we write the frequency of an


event A as
number of times that A occurs
freqA = .
N
If N is very large, what would the frequency of the event A be like?
Theorem (Law of Large Numbers)
If an experiment is repeated again and again, the probability of an event
obtained from the relative frequency approaches the actual or theoretical
probability.

freqA → P (A) as N → ∞.

17 / 49
3. “Subjective Probability”. Many times we face experiments that
neither have equally likely outcomes nor can be repeated to generate
data.
Consider the following probabilities of events.
The probability that Carol, who is taking AMA1110 this semester,
will get an A in this subject.
The probability that the Hang Seng Index will be higher than
26345 at the end of the next trading day.
The probability that the Manchester City will win the English
Premier League in this season.

In such cases, we cannot compute the probabilities of events using the


classical probability rule or the relative frequency concept.

18 / 49
Definition (Subjective probability)
Subjective probability is the probability assigned to an event based on
subjective judgment, experience, information, and belief.

Neither the classical probability rule nor the relative frequency


concept of probability can be applied to calculate probabilities for these
examples.
All these examples belong to experiments that have neither equally
likely outcomes nor the potential of being repeated.

19 / 49
§10.5 Counting Rules

Multiplicative Rule
Permutations Rule
Combinations Rule

20 / 49
§10.5.1 Multiplicative Rule

Multiplicative Rule
Let there be k tasks to be done. Assume that one has n1 different ways
to finish the first task, n2 different ways to accomplish the second task,
n3 different ways to execute the third task, etc.. Then he has in total

n1 × n2 × · · · × nk

ways to complete all the k tasks.

appetizer main course drinks


soup pork juice
salad steak beer
fish water
wine
how many possible combinations?

21 / 49
Example
Suppose that you have 20 candidates to fill 3 different executive
positions, E1 , E2 and E3 . How many different ways could you fill the
positions? (It is generally agreed that each candidate can assume at
most one position.)

Solution.
1 The number of candidates available to fill position E1 : n1 = 20.
2 The number of candidates remaining (after filling E1 ) that are
available to fill E2 : n2 = 19.
3 The number of candidates remaining (after filling E1 and E2 ) that
are available to fill E3 : n3 = 18.
The number of different ways to fill the three positions is
20 × 19 × 18 = 6840.

22 / 49
§10.5.2 Permutations Rule

Definition (10.5.3)
A permutation of a set of distinctive objects, is any arrangement of
these objects in a definite order.

Example
If S = {a, b, c}, then
abc, acb, bca, bac, cab, cba

are all the permutations of the elements of S.

Factorial
n! = n(n − 1)(n − 2) · · · 3 · 2 · 1.

Specially, we define 0! = 1.

23 / 49
By the Multiplicative Rule, we have
• The number of permutations of n distinct elements is n!.
• The number of permutations of “taking r from n distinct objects”,
where 1 ≤ r ≤ n, is
n!
n(n − 1)(n − 2) · · · (n − (r − 1)) = ,
(n − r)!

which is denoted by n Pr .

24 / 49
Example
A company has 8 applicants to fill 6 different jobs. In how many
different ways can the jobs be filled? (It is assumed that each applicant
can take at most one job.)

Solution.

25 / 49
Example
Suppose that two letters are to be selected from A, B, C, and D and
after selection they are arranged in order. (It is assumed that each letter
can only be selected at most once.)
(a). How many permutations are possible?
(b). What is the probability that the selection will contain letter “A”?

Solution.

26 / 49
§10.5.3 Combination Rule

Definition (10.5.6)
A combination of a set of objects is a subset of the objects
disregarding their order. Thus, the number of combinations of “taking
r from n distinct objects” is
 
n n Pr n!
n Cr , or , = .
r P
r r r!(n − r)!

n Cr read as “n choose r”.

27 / 49
Example
To select 3 letters from {A, B, C, D, E}, one has 5 P3 = 5!
2! = 60
permutations; within these permutations, each group of 3 letters
appears EXACTLY 3 P3 = 3! = 6 times.

ABC ABD ABE ACD ACE ADE BCD BCE BDE CDE
ACB ADB AEB ADC AEC AED BDC BEC BED CED
CAB BDA BEA CDA CEA DEA CDB CEB DEB DEC
CBA BAD BAE CAD CAE DAE CBD CBE DBE DCE
BAC DAB EAB DAC EAC EAD DBC EBC EBD ECD
BCA DBA EBA DCA ECA EDA DCB ECB EDB EDC

Thus, the number of combinations is

5 P3 5! 1 5!
5 C3 = = × =
3 P3 (5 − 3)! 3! (5 − 3)!3!

28 / 49
Example (Semester 2, 2017-2018, 3(a))
A committee consists of 3 administrators, 3 engineers and 5 foremen.
A subcommittee of 6 members is to be chosen randomly.
(i) What is the probability that there will be 1 administrator,
3 engineers and 2 foremen on the subcommittee?
(ii) What is the probability that at least one foreman will be
in the subcommittee?
Solution.

29 / 49
§10.5.4 Venn Diagram

John Venn (4 August 1834 – 4 April 1923), an English logician and


philosopher. Photos from Wikipedia.

30 / 49
A

A typical Venn diagram. Here S (the big square) is the whole sample
space, and A (the shaded disk) is an event, namely a subset of S.

31 / 49
§10.5.5 Basic Probability Laws

Definition (10.5.8)
The Union of two events A and B is the event of all outcomes that are
included in either A or B or both. The union is denoted by A ∪ B.

A B

A∪B
S
The union A ∪ B (shaded) of A and B. Usually the union A ∪ B is
referred to as “A or B”.

32 / 49
Definition
The intersection of two events A and B is the event of all outcomes
that belong to both A and B. The intersection is denoted by A ∩ B.

A B

S A∩B

The intersection A ∩ B (shaded) of A and B. Usually the intersection


A ∩ B is referred to as “A and B”.

33 / 49
Example. Suppose we are tossing a die. Let event A be that we get 1
or 2, and event B be that we get even number (i.e. 2, 4, or 6).

A = {1, 2}, B = {2, 4, 6}.

Then A ∪ B is the event that we get one of the numbers 1, 2, 4, or 6,


and the event A ∩ B is the event that we get a number 2. That is,

A ∪ B = {1, 2, 4, 6}, A ∩ B = {2}.

Definition (10.5.12)
A collection of events A1 , A2 , . . . , An is said to be collectively
exhaustive if their union is the whole sample space. (Therefore at least
one of them will occur for sure in the experiment).

S = A1 ∪ A2 ∪ · · · ∪ An .

34 / 49
Example. Suppose a student is randomly selected from the Hong Kong
PolyU. Let M be the event that this student is male, and F be the event
that the student is female. Then events M and F are collectively
exhaustive.

35 / 49
Addition Rule
Theorem (10.5.14, Addition Rule)

P (A or B) = P (A ∪ B) = P (A) + P (B) − P (A ∩ B)

The following Venn diagrams illustrate the idea of proof.

A B A B

A∪B
S S A∩B

A B A B

S S

36 / 49
Example
A Burger shop finds that 65% of its customers order French fries, 78%
order soft drink, and 55% order both. What is the probability that a
customer would order at least one of these two items?
Solution.

37 / 49
Example (Semester 1, 2018-2019, 3(a))
A drum contains 3 black balls, 5 red balls and 6 green balls. If 4 balls
are selected at random, what is the probability that the 4 selected balls
contain
(i) Exactly 1 red ball and exactly 2 green balls?
(ii) Either exactly 1 red ball or exactly 2 green balls?

Solution.

38 / 49
Definition (10.5.16)
Two events are said to be mutually exclusive if when one of them
occurs, the other will not occur for sure.

A B

S
Venn diagram: the events A and B are mutually exclusive.

39 / 49
Clearly, if A and B are mutually exclusive, then P (A ∩ B) = 0.
Corollary 10.5.18 (Addition Rule – Mutually Exclusive). If the
events A and B are mutually exclusive then

P (A ∪ B) = P (A) + P (B).

Example
A box contains two white balls, four yellow balls and five red balls. A
ball is selected from the box randomly (in other words, all balls are to
be selected equally likely). What is the probability that the selected ball
is red or yellow?

Solution.

40 / 49
Definition (10.5.20)
The complement of an event A, denoted by A, or Ac , or A0 , is defined
to be the event consisting of all samples that are not in A.

S
Venn diagram: the event A and its complement A. We see that they are
mutually exclusive, and collectively exhaustive, i.e.,
A ∪ A = S, P (A ∩ A) = 0.
41 / 49
Example Suppose a student is randomly selected from the Hong Kong
PolyU. Let M be the event that this student is male, and F be the event
that the student is female. Then events M and F are collectively
exhaustive, and mutually exclusive. Furthermore, we have M = F , and
F = M.

Example. Suppose we are tossing a die. Let event A be that we would


get number 3 or 4. Then

A = {1, 2, 5, 6}.

42 / 49
Theorem (10.5.22)
For any event A,

P (A) = 1 − P (A).

Proof. Since A and A are mutually exclusive and collectively exhaustive,

1 = P (S) = P (A ∪ A) = P (A) + P (A),

so we have

P (A) = 1 − P (A).

43 / 49
Example. A school is recruiting four teachers. Five men and three
women are competing for the positions (no orders). Suppose each one
of the competitors is equally likely to be chosen. What is the
probability that at least one woman will be selected?
Solution.

44 / 49
Theorem (De Morgan’s laws)
Let A and B be two events, then A ∪ B = A ∩ B and A ∩ B = A ∪ B.

A∩B

A B A B

A∪B

S shaded part: A ∪ B S shaded part: A ∩ B

A B A B

S shaded part: A S shaded part: B

45 / 49
Here is another proof of the De Morgan’s laws.

Proof of “A ∪ B = A ∩ B”.

For any x ∈ A ∪ B we have x 6∈ A ∪ B. So x 6∈ A hence x ∈ A.


Similarly x ∈ B. This proves A ∪ B ⊂ A ∩ B.

On the other hand for any x ∈ A ∩ B, we have x ∈ A so x 6∈ A.


Similarly x 6∈ B. Therefore x 6∈ A ∪ B, so x ∈ A ∪ B. This proves
A ∪ B ⊂ A ∪ B.

We combine the above arguments to obtain A ∪ B = A ∩ B.

Question: using this method try to prove A ∩ B = A ∪ B.

46 / 49
Example
Tom and Jerry work in the same company. Each day Tom has
probability 8% to be absent, Jerry has probability 5% to be absent, and
they together have 2% probability to be absent both. Find the following
probabilities.
a. either or both of them are absent;

Solution.

47 / 49
Example
Tom and Jerry work in the same company. Each day Tom has
probability 8% to be absent, Jerry has probability 5% to be absent, and
they together have 2% probability to be absent both. Find the following
probabilities.
b. either or both of them come to work;

Solution.

48 / 49
Example
Tom and Jerry work in the same company. Each day Tom has
probability 8% to be absent, Jerry has probability 5% to be absent, and
they together have 2% probability to be absent both. Find the following
probabilities.
c. only one of them comes to work.

Solution.

49 / 49

You might also like