0% found this document useful (0 votes)
49 views

CH04 - Probability - Random 2

Uploaded by

mk.foo123
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
49 views

CH04 - Probability - Random 2

Uploaded by

mk.foo123
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 81

#Probability & Statistical Data Analysis/ Slides

CHAPTER 4
(Part 1)
Overview of Probability

[email protected]: 2020/2021, Sem. 2

1
Probability
(Recall from subject SCSI1013 – Discrete Maths: Chapter 3 (Part 4 – probability theory)

 Probability – the systematic study of uncertainty.


 Example of activities involve with uncertainty:

Rolling a die
Tossing a coin Select cards from deck
2
Chance Experiments
Suppose:
• two six-sided die is rolled and they both land on
sixes.
• a coin is flipped and it lands on heads.
These would be examples of chance experiments.

A chance experiment is any activity or situation


in which there is uncertainty about which of two
or more plausible outcomes will result.
3
Sample Space
Suppose a six-sided die is rolled. The possible outcomes are that
the die could land with 1 dot up or 2, 3, 4, 5, or 6 dots up.

S = {1, 2, 3, 4, 5, 6}
This would be an example of a sample space (S).

The collection of all possible outcomes of a


chance experiment is the sample space for the
experiment.
4
Sample Space (cont.)
Suppose two coins are flipped. The sample space would be:

S = {HH, HT, TH, TT} ; H = heads and T = tails

We can also use a tree diagram to represent a sample space.


H
H
T
HT
H
T
T
5
Event
 Example: The car purchase chance experiment has a sample
space:
S = {MH, FH, MT, FT} ;
where M = male, F=female, H=hybrid, T= traditional.
 We might focus on a group of outcomes that involve the
purchase of a hybrid – the group consisting of (male, hybrid)
and (female, hybrid).
 When we combine one or more individual outcomes in a
collection, we are creating what is known as event.

An event is any collection of outcomes from the


sample space of a chance experiment.
6
Complement, Union & Intersection

Let A and B denote two events.


 The event not A (or complement of A) consists of all
experimental outcome that are not in event A, denoted by
𝑨 , 𝑨𝒄 , 𝑨,
 The event A or B (or the union of two events) consists of all
experimental outcome that are in at least one of the two
events, that is, in A or in B or in both of these, denoted by
𝑨∪𝑩
 The event A and B (or the intersection of two events) consists
of all experimental outcome that are in both A and B, denoted
by
𝑨∩𝑩
7
Example - Complement
Suppose a six-sided die is rolled. The event that the die would
land on an even number would be

E = {2, 4, 6}
What would the event be that is the die NOT landing on an even
number?

EC = {1, 3, 5}
The sum of the
probabilities of
complementary
events equals ONE.

8
Example - Union

Suppose a six-sided die is rolled. The event that the die would land
on an even number would be

E = {2, 4, 6}
The event that the die would land on a prime number would be

P = {2, 3, 5}
What would be the event E or P happening?

E or P = {2, 3, 4, 5, 6}

9
Example - Intersection
Suppose a six-sided die is rolled. The event that the die
would land on an even number would be
E = {2, 4, 6}
The event that the die would land on a prime number
would be
P = {2, 3, 5}

What would be the event E and P happening?


E and P = {2}
10
Venn Diagram
Let’s revisit rolling a die and getting an even or a prime number . . .
E or P = {2, 3, 4, 5, 6}
Another way to represent this is with a Venn Diagram.

Even number Prime number

4 3
2
1
6 5
Why is the number 1
outside the circles?

11
Approach to Probability
When the outcomes in a sample space are equally
likely, the probability of an event E, denoted by P(E), is
the ratio of the number of outcomes favorable to E to
the total number of outcomes in the sample space.

Examples: flipping a coin, rolling a die, etc.

12
Probability - Rules
• Fundamental Properties of Probability

Property 1. Legitimate Values

For any event E, 0 ≤ 𝑝(𝐸) ≤ 1

Property 2. Sample space

If S is the sample space, P(S) = 1

13
Property 3: Addition
If two events E and F are disjoint,
P(E or F) = P(E) + P(F)

Property 4: Complement
For any event E, P(E) + P(not E) = 1

14
Exercise #1

The student council for a school of science and math has one representative
from each of the five academic departments: biology (B), chemistry (C),
mathematics (M), physics (P), and statistics (S). Two of these students are to be
randomly selected for inclusion on a university-wide student committee (by
placing five slips of paper in a bowl, mixing and drawing out two of them).

a)What are the 10 possible outcomes?


b)From the description of the selection process, all outcomes are equally
likely. What is the probability of each event?
c)What is the probability that one of the committee members is the statistics
department representative?
d)What is the probability that both committee members come from
laboratory science departments?

15
Exercise #2

A large department store offers online ordering. When a purchase is made online, the
customer can select one of four different delivery options: expedited overnight delivery,
expedited second-business-day delivery, standard delivery, or delivery to the nearest
store for customer pick-up. Consider the chance experiment that consists of observing
the selected delivery option for a randomly selected online purchase.

a)What are the events that make-up the sample space for this experiment?
b)Suppose that the probability of an overnight delivery selection is 0.1, the probability of
a second-day delivery selection is 0.3, and the probability of a standard-delivery
selection is 0.4. Find the following probabilities:
i) The probability that a randomly selected online purchase selects delivery to
the nearest store for customer pick-up.
ii) The probability that the customer selects a form of expedited delivery.
iii) The probability that either standard delivery or delivery to the nearest store is
selected.

17
CHAPTER 4
(Part 2)

Random Variables &


Probability Distribution

19
Random Variables
• A numerical variable whose value depends on the
outcome of a chance experiment.
• It associates a numerical value with each outcome of
a chance experiment.
• Two types of random variables:
1) Discrete
2) Continuous

20
Discrete Random Variables
• Discrete – its set of possible values is a collection of
isolated points along a number line.
This is typically a
“count” of something

• Continuous - its set of possible values includes an entire


interval on a number line.

This is typically a
“measure” of something

21
Example
Suppose that a counsellor plans to select a random sample of 50 seniors at
a large high school and to ask each student in the sample whether he or
she plans to attend college after graduation. The process of sampling is a
chance experiment. The sample space for this experiment consists of all
different possible random samples of size 50 that might result (there is a very
large number of these) and for simple random sampling, each of these
outcomes is equally likely.

Let x is the random variable.


• x represent the number of successes in the sample (who plans to attend
college after graduation).
• Thus, x is discrete random variable (counting).

22
Example
A point is randomly selected on the surface of a lake
that has a maximum depth of 100 feet. Let y be the
depth of the lake at the random chosen point.

• The possible value of y : measurement in feed of the


depth of the lake.
• Thus, y is continuous random variable.

23
Example
Consider an experiment in which the type of book, print (P) and
digital (D), chosen by each of three successive customers making a
purchase from on an online bookstore is recorded. Define a
random variable x by

The experimental outcome can be abbreviated, e.g., DPD (first and


third customer purchase a digital book).

Outcome PPP DPP PDP PPD DDP DPD PDD DDD


x value 0 1 1 1 2 2 2 3

There are only 4 possible x values: 0, 1, 2 and 3. Thus, x is discrete


random variable.
24
25
Definition

 Probability distribution is a model that describes the


long-run behaviour of a variable.
 The mathematical definition of a discrete
probability distribution is : p(x)
 If x =2, we write p(2) in place of p(x=2)
 p(5) denotes the probability that x=5.

26
 It give the possibility associated with each possible x
value.
 Each probability is the long-run relative frequency of
occurrence of the corresponding x value when the
chance experiment is performed a very large number
of times.
 Common way to display a probability distribution for
discrete random variable: table, histogram, formula.

27
Example
In a Wolf City, regulations prohibit no more than five
dogs or cats per household.
Let, x = the number of dogs and cats in a randomly
selected household in Wolf City.
Then, the Department of Animal Control has collected
data over the course of several years.
They want to estimate the long-run probabilities for the
values of x.

28
• The results as follows:

x 0 1 2 3 4 5
p(x) 0.26 0.31 0.21 0.13 0.06 0.03

This is called a discrete probability


distribution. It can also be displayed in
a histogram with the probability on the
vertical axis.

Probability

Number of Pets
29
Properties of Discrete Probability
Distributions

1) For every possible x value,


0 < p(x) < 1.

2)

30
Example
Refer to previous example (Dogs and Cats) .

x 0 1 2 3 4 5
p(x) 0.26 0.31 0.21 0.13 0.06 0.03

What is the probability that a randomly selected


household in Wolf City has at most 2 pets?

p(x < 2) = p(0) + p(1) + p(2)


= 0.26 + 0.31 + 0.21 = 0.78
31
x 0 1 2 3 4 5
p(x) 0.26 0.31 0.21 0.13 0.06 0.03

What is the probability that a randomly selected


household in Wolf City has less than 2 pets?

p(x < 2) = p(0) + p(1)


= 0.26 + 0.31 = 0.57

32
x 0 1 2 3 4 5
p(x) 0.26 0.31 0.21 0.13 0.06 0.03

What is the probability that a randomly selected


household in Wolf City has more than 1 but no more
than 4 pets?

p(1 < x ≤ 4) = p(2) + p(3) + p(4)


= 0.21 + 0.13 + 0.06 = 0.40

33
34
Definition:
Continuous Variables Probability Distribution
Continuous Random Variable
• A continuous random variables is a random variable
where the data can take infinitely many values.
• A continuous random variable “x” takes all values in
a given interval of numbers.

35
Definition :
Probability Distribution for Continuous
Random Variable

• It is specified by a curve called a density curve.

• The function that describes this curve is denoted by


f(x) and is called the density function.

• The probability of observing a value in a particular


interval is the area under the curve and above the
given interval.

36
Continuous Variables Probability Distribution

Density curve

Density function
Probability

37
Properties of Continuous probability
distributions

1. f(x) > 0 (the curve cannot dip below the


horizontal axis).

2. The total area under the density curve equals


one.

38
Example
Suppose x is a continuous random variable defined as the amount of
time (in minutes) taken by a clerk to process a certain type of
application form. Suppose x has a probability distribution with density
function:
.5 4  x  6
f (x )  
0 otherwise
The following is the graph of f(x), the density curve:

0.5
Density

4 5 6
Time (in minutes)

39
Example (cont.)
What is the probability that it takes more than 5.5 minutes
to process the application form?

p(x > 5.5) = 0.5(0.5) = 0.25

0.5
Density

4 5 6
Time (in minutes)

40
Other Density Curves
Some density curves resemble the one below.
Integral calculus is used to find the area under
the these curves.
We will use tables (with the values already
calculated).

41
The probability that a continuous random variable x
lies between a lower limit a and an upper limit b is
p(a < x < b) = (cumulative area to the left of b) –
(cumulative area to the left of a)

p(a < x < b) = p(x < b) – p(x < a)

42
• Other continuous
distribution

We will use tables for certain


distribution (with the values already
calculated).

43
CHAPTER 4
(Part 3)

Discrete & Continuous


Probability Distribution

44
Special Distributions

 Discrete Distribution:
• Binomial
• Negative Binomial
• Geometric
 Continuous Distribution:
• Normal

45
46
Binomial Distribution

 An experiments often consists of repeated trials,


each with two possible outcomes that may be
labeled success or failure.
 Example: The testing items as they come off an
assembly line, where each trial may indicate a
defective or a non-defective item.
 The process is referred to as a Bernoulli process.
 Each trial is called a Bernoulli trial.

47
Binomial Distribution (cont’d)
Properties of a Bernoulli process:

1. There are a fixed number of trials.


2. Each trial results in one of only two possible outcomes,
labeled success (S) or failure (F).
3. Outcomes of different trials are independent.
4. The probability that a trial results in success is the same
for all trials.

48
Binomial Distribution (cont’d)
 The number X of success in n Bernoulli trials is called a binomial
random variable.
 The probability distribution of this discrete random variable is
called the binomial distribution.
 Formula:
A Bernoulli trial can result in a success with probability p and a
failure with probability q = 1-p. Then the probability distribution of
the binomial random variable X, the number of successes in n
independent trials, is
𝑛
𝑏 𝑥; 𝑛, 𝑝 = 𝑝 𝑞 , 𝑥 = 0, 1, 2, … , 𝑛
𝑥
 The mean and variance of the binomial distribution:

𝜇 = 𝑛𝑝 ; 𝜎 = 𝑛𝑝𝑞

49
Example

The probability that a certain kind of component will


survive a shock test is ¾. Find the probability that exactly
2 of the next 4 components tested survive.

Solution:
Assuming that the tests are independent and p = ¾ for
each of the 4 tests, we obtain
3 4 3 1 27
𝑏 2; 4, 4 = =
2 4 4 128

50
Example
A coin is tossed four times. Find the mean and variance
of the number of heads that will be obtained? Given the
distribution as follows.

No of head, x 0 1 2 3 4
Probability 1/16 4/16 6/16 4/16 1/16

Solution:
1 1
𝑛 = 4, 𝑝 = ; 𝑞 =
2 2
.: 𝜇 = 4 = 2;
.: 𝜎 = 4 =1

51
Negative Binomial Distribution

If repeated independent trials can result in a success with


probability p and a failure with probability q = 1- p, then
the probability distribution of the random variable x, the
number of the trial on which the k-th success occurs, is

𝑥−1
𝑏∗ 𝑥; 𝑘, 𝑝 = 𝑝 𝑞 , 𝑥 = 𝑘, 𝑘 + 1, 𝑘 + 2, … .
𝑘−1

52
Example
A scientist inoculates mice, one at a time, with a diseases germ
until he finds 2 that have contracted the diseases. If the probability
of contracting the diseases is 1/6, what is the probability that 8
mice are required?

Solution:
8−1
𝑏 ∗ 8; 2,0.1667 = (0.1667) (1 − 0.1667) = 0.0651
2−1

53
Geometric Distribution

Geometric distribution is in a sense INFINITE. They’re


asking you what is the probability UNTIL the first success
happens.

Example:
Malik throws a dice until he gets a ‘4’.
What is the probability of him getting the first ‘4’ in the
6th throw? How to calculate the probability?

54
Geometric Distribution (cont’d)

Geometric Probability Distribution function:

If x is a random variable with probability of success = p for


each trial, then

𝑔 𝑥; 𝑝 = (1 − 𝑝) 𝑝; 𝑥 = 1, 2, 3, … .

55
Geometric Distribution (cont’d)

Formulas for mean and standard deviation of a geometric


distribution:

56
Example
A product produced by a machine has a 3% defective
rate. What is the probability that the first defective
occurs in the fifth(5th) item inspected?

Solution:

57
Exercise#1
It is claimed that 15% of the ducks in a particular region have patent
schistosome infection. Suppose that seven ducks are selected at
random. Let x equals the number of ducks that are infected.

a) Assuming independence trials, how is x distributed?

b) Find the probability that:


i) At most two ducks are infected.
ii) One duck is not infected.

c) A new drug is proposed to treat the schistosome infection.


Therefore, the infected duck is randomly selected. What is the
probability that the first duck infected is found at the fifth trial?

58
Exercise #2
In an NBA (National Basketball Association) championship series, the team that
wins four games out of seven is the winner. Suppose that teams A and B face
each other in the championship games and that team A has probability 0.55 of
winning a game over team B.
a) What is the probability that team A will win the series in 6 games?
b) What is the probability that team A will win the series?
c) If teams A and B were facing each other in a regional playoff series, which
is decided by winning three out of five games, what is the probability that
team A would win the series?

61
Exercise #3

A company fabricates special-purpose robots and


records show that the probability is 0.10 that the one of
its new robots will require repairs during confirmation
tests. What is the probability that the eighth robot it
builds in a month is the first one to require repairs?

63
65
Continous Distribution

• Symmetrical bell-shaped (unimodal) density curve


defined by  and 
• Area under the curve equals 1.
• Probability of observing a value in a particular interval
is calculated by finding the area under the curve.
• As  increases, the curve flattens & spreads out.
• As  decreases, the curve gets taller and thinner.

66
A


 
Do these two normal curves have the same mean? YES
Which normal curve has a standard deviation of 3? B
Which normal curve has a standard deviation of 1? A

67
Effect of Varying
Parameters ( & )
f(X)
B

A C

68
Notation

x is N(μ,σ)
The random variable x has a normal distribution
(N) with mean, μ and standard deviation, σ.
Example:
x is N(40,1)
x is N(10,5)
x is N(50,3)

69
Probability Density Function

x = value of random variable (- < x < )


 = Population Standard Deviation
 = 3.14159
e = 2.71828
 = Mean of Random Variable x

70
Normal Curve

Notice that the


normal curve is
curving downwards
from the center
(mean) to points
that are one
standard deviation
on either side of the
mean. At those
points, the normal
curve begins to turn
upward.
71
Standard Normal Distribution

• Is a normal distribution with 𝜇 = 0 and 𝜎 = 1

• It is customary to use the letter z to


represent a variable whose distribution is
described by the standard normal curve (or
z curve).

72
Normal Distribution Probability

Probability is
area under
curve! c
d
P(c  x  d )   f ( x) dx ?
f(x)

x
c d

73
Infinite Number of Distribution Tables

Normal distributions differ by Each distribution would


mean & standard deviation. require its own table.

f(X)

X
That’s an infinite number!
74
Standardize the Normal Distribution

Normal
Distribution

 X
One table!
75
Example #1
What is the probability of p(X=6.2), given that the mean is 5 and std.
deviation is 10?.

Normal Distribution

 = 10

= 5 6.2 X
76
Example #1 -Solution

Step 1: Find the Z value.

Normal Distribution Standardize Normal Distribution

 = 10 =1

= 5 6.2 X = 0 .12 Z
Note: Shaded area exaggerated.
77
Step 2: Refer to standard Normal Dist. Table to locate the Z value.

Standardized Normal Probability


Table (Portion)
=1
0.04776
.0478

= 0 .12 Z
P(Z=0.12) = 0.54776 - 0.5 = 0.04776

78
Example #2: Find P(3.8  X  5)
Normal Distribution
 = 10

…………….
3.8 = 5 X
Standardize Normal Distribution

=1
0.04776

P(Z=0.12) = 0.5 – 0.45224


= 0.04776 -.12  = 0 Z
79
Example #3: Find P(2.9  X  7.1)

Normal Distribution

 = 10

2.9 5 7.1 X

80
=1 0.08317+0.08317

=0.16634
0.08317 0.08317

-.21 0 .21 Z
81
Example #4: Find P(X  8)

X  85
Z   .30
 10

P(Z=0.30) = 1 - 0.61791 = 0.3821


Normal Distribution Standardize Normal Distribution

 = 10 =1

0.3821

=5 8 X =0 .30 Z


82
Example #5: Find P(7.1  X  8)

P(0.21  Z  0.30) = 0.11791 – 0.0832 = 0.03471


Normal Distribution Standardize Normal Distribution
 = 10 =1

.11791
0.03471
.08317

 = 5 7.1 8 X  = 0 .21 .30 Z


83
Finding Z Values for Known Probabilities

If Z greater than mean, what is Z given that P(Z) = 0.12172?

P(Z=?) = a - 0.5 = 0.12172 => 0.12172 + 0.5 = 0.62172


Standardize Normal Distribution
Standardized Normal
.1217 =1 Probability Table (Portion)

 = 0 .31
? Z
Note:
If Z less than mean, than Z
value has negative sign.
84
Normal Distribution Standardize Normal Distribution

 = 10 =1

.1217 .1217

= 5 ? X  = 0 .31 Z

X    Z    5  .3110   8.1
85
Exercise #4
A lecturer commutes daily from his suburban home to his midtown university.
The average time for a one-way trip is 24 minutes, with a standard deviation
of 3.8 minutes. Assume that the distribution of trip times to be normally
distributed.

a)What is the probability that a trip will take at least ½ hours?


b)If the office open at 9.00 A.M and the lecturer leaves his house at 8.45 A.M
daily, what percentage of the time is he late for work?
c)If he leaves the house at 8.35 A.M and coffee is served at the office from
8.50 A.M until 9.00 A.M. what is the probability that he missed coffee?
d)Due to unforeseen incident, the journey takes longer than usual. If 15% is
considered as unusual journey time, what is the length of unusual journey
time.
e)Using Binomial distribution, find the probability that 2 of the next 3 trips will
take at least ½ hour.

86

You might also like