Prob & Stat
Prob & Stat
MN/GL/GM/MR/PE/ES 361
BY
B. ODOI
1
INTRODUCTION
Statistics is a way to get information from data. Statistics is a discipline
which is concerned with:
• Without the use of statistics, little can be learnt from most research
studies.
• Organize the entire set of scores into a table or a graph that allows researchers
(and others) to see the whole set of scores (summarizing data graphically).
• Compute one or two summary values (such as the average) that describe the
entire group (summarizing data numerically).
Inferential statistics
• This is the branch of statistics that involves using a sample to draw conclusions
about a population. A basic tool in the study of inferential statistics is
probability.
5
Variables
In statistics, a variable has two defining characteristics:
• A variable is an attribute that describes a person, place, thing, or idea.
• The value of the variable can "vary" from one entity to another.For example, a person's hair
color.
• Qualitative variables take on values that are names or labels. The color of a ball (e.g., red,
green, blue) or the breed of a dog (e.g., collie, shepherd, and terrier).
• Quantitative variables are numeric. They represent a measurable quantity. when we speak of
the population of a city, we are talking about the number of people in the city - a measurable
attribute of the city. Therefore, population would be a quantitative variable.
• If a variable can take on any value between its minimum value and its maximum
value, it is called a continuous variable; otherwise, it is called a discrete variable.
• Univariate data. When we conduct a study that looks at only one variable, we say
that we are working with univariate data.
8
• A measurable characteristic of a population, such as a mean or standard deviation,
is called a parameter; but a measurable characteristic of a sample is called a
Statistic
10
Summary Statistics
Measure of Location
These provide an indication of the center of the distribution where most of the
scores tend to cluster.
There are three principal measures of central tendency:
• Mode
• Median
• Mean
Measure of Spread/ Variability
Variability is the measure of the spread in the data. The three common ones for
this concept are:
• Range
• Variance
• Standard deviation
11
How to Describe Data Patterns in Statistics
Graphic displays are useful for seeing patterns in data. Patterns in
data are
commonly described in terms of:
Center
Spread: The spread of a distribution refers to the variability of the
data.
Uniform. When the observations in a set of data are equally spread across
the
range of the distribution, the distribution is called a uniform distribution.
For example
• the toss of a coin and a die yield the possible outcomes in the sets,
{H, T} and {1, 2, 3, 4, 5, 6} and a play of a football match yields {win
(W), loss (L), draw (D)}.
19
Sample Space:
• Sample space is the collection of all possible outcomes at a probability
experiment. We use the notation S for sample space.
For example
• The results of two and three tosses of a coin give the following sample
spaces:
S = {HH, HT, TH, TT}
S = {HHH, HHT, HTH, HTT, THH, THT, TTH,TTT}
For example
• The event of observing a head (H) in three tosses of a coin,
A = {HTT, TTH}
• The event of obtaining a total score of 8 on two tosses of a die,
B = {2,6), (3,5), (4,4), (5,3), (6,2)}
Consider a newly married couple planning to have three children.
For example:
• Consider a couple planning to have three children, assuming each child born
is equally likely to be a boy (B) or girl (G).
• A soccer team on winning (WT) or losing (LT) a toss can defend either post A
or B. It plays the match and either win (W), draw (D) or lose (L). We illustrate
the experiment on a diagram as follows:
22
Determination of Probability of an Event
• The probability of an event A, denoted, P(A), gives the numerical measure of
the likelihood of the occurrence of event A which is such that 0 ≤ P (A) ≤ 1.
• There are three main schools of thought in defining and interpreting the
probability of an event. Classical Definition, Empirical Concept ( and the
Subjective Approach. The first two are referred to as the Objective Approach.
23
• The Classical Definition: This is based on the assumption that the outcomes of
an experiment are equally likely.
For example:
• if an experiment can lead to n mutually exclusive and equally likely outcomes,
then the probability of the event A is defined by
• The relative frequency of the occurrence of the event A used to estimate P(A)
becomes more accurate if trials are largely repeated.
For example
• determining the probability of getting a cure of a disease or going to rain
today.
26
Example 1:.
Consider the problem of a couple planning to have three children, assuming each
child born is equally likely to be a boy (B) or a girl (G).
(a) List the possible outcomes in this experiment
(b) What is the probability of the couple having exactly two girls?
Solution:
(a) The sample space for this experiment is
S = {BBB, BBG, BGB, BGG, GBG, GGB, GGG}
(b) Let A be the event of the couple having exactly two girls. Then,
A = {BGG, GBG, GGB}
n( A) 3
P ( A)
n( S ) 8 27
Example 2:
Suppose a card is randomly selected from a packet of 52 playing cards.
(i) What is the probability that it is a “Heart”?
(ii) What is the probability that the card bears the number 5 or a picture
of a queen?
(b) A box contains 4 red, 2 black and 3 white balls. What is the probability of
drawing
a red ball?
Solution:
Let the sample space be the set, S = {playing cards}, A = {Heart cards}, B = {Cards
numbered 5} Q = {Cards with a picture of queen}.
n( A) 13 1
(i) P ( A)
n( S ) 52 4
(ii) P ( B or Q ) P ( B ) P (Q )
n( B) n(Q) 4 4 2
n( S ) n( S ) 52 52 13
(b) The sample space, S = {4R, 2B, 3W-balls} and let R = {red balls}. Then
n( R ) 4
P( R)
n( S ) 9 29
TRY:
A die is tossed twice. List all the outcomes in each of the following events and
compute the probability of each event.
(a) The sum of the scores is less than 4
(b) Each toss results in the same score
(c) The sum of scores on both tosses is a prime number
(d) The product of the scores is at least 20
Solution:
The sample space for the experiment is the set of ordered paired (m, n), where
m, n each takes the values 1, 2, 3, 4, 5 and 6. Thus
S = {(1, 1), (1, 2), (1, 3), . . . . , (6, 6)}, where n(S) = 36
3 1
(a) A = {(1, 1), (1, 2), (2, 1)}, P ( A) 30
36 12
(b) B = {each toss results in the same score}
= {(1, 1), (2, 2), (3, 3), (4, 4), (5, 5), (6, 6)}
6 1
P( B)
36 6
8 2
P( E )
36 9 31
Probability of Compound Events
Two or more events are combined to form a single event using the set operations
and . The event :
Definitions:
Mutually Exclusive Events: Two or more events which have no common outcome(s) (i.e. never
occur at the same time) are said to be mutually exclusive.
Conditional Probability: Let A and B be two events in the sample space, S with
P(B) > 0.
• The probability that an event A occurs given that event B has already
occurred, denoted P(A/B), is called the conditional probability of A given B.
33
The conditional probability of A given B is defined as.
P A B
P A / B , P( B) 0
P B
n A B n B n A B
P A B , P B and P A / B
n S n S n B
Exhaustive Events: Two or more events defined on the same sample space are
said to be exhaustive if their union is equal to the sample space S.
34
EXAMPLE 1
a) In a certain population of women, 40% have had breast cancer, 20%
are smokers and 13% are smokers and have had breast cancer. If a women is
selected at random from the population, what is the probability that she had
breast cancer, smokes or both?
(b) Let A and B be events such that P A 0.6 , PB 0.5 and A B 0 .8
i. Find P A / B
ii. are A and B independent?
35
Solution:
(a) Let B be the event of women with breast cancer and W the event of
women who smoke. Then,
36
i.
P A B P A P B P A B
0 .6 0 .5 0 .8 0 .3
P A B
P A / B , P( B) 0
P B
0 .3 3
0 .6
0 .5 5
37
ii. A and B are independent if P A P B P A B
Exercise/Assignment
Suppose that of all individuals buying a certain digital camera, 60% include an
optional memory card in their purchase, 40% include an extra battery, and 30%
include both a card and battery. Given that the selected individual purchased
an extra battery, what is the probability that an optional card was also
purchased is?
38
Bayes’ Rule
• The power of Bayes’ rule is that in many situations where we want to compute
P(A|B) it turns out that it is difficult to do so directly, yet we might have direct
information about P(B|A). Bayes’ rule enables us to compute P(A|B) in terms
of P(B|A). P( A B) P ( B / A) P ( A)
P( A / B)
P( B) P( B)
Bayes’ Theorem
• Let A and Ac constitute a partition of the sample space S such that with P(A) > 0
and P(Ac) > 0, then for any event B in S such that P(B) > 0,
P ( B / A) P ( A)
P( A / B)
P ( B / A) P ( A) P ( B / A c ) P ( A c )
P ( A) P ( B / A) P ( A) P ( B / A) 39
Example
A paint-store chain produces and sells latex and semigloss paint. Based on long-
range sales, the probability that a customer will purchase latex paint is 0.75. Of
those that purchase latex paint, 60% also purchase rollers. But only 30% of
semigloss pain buyers purchase rollers. A randomly selected buyer purchases a
roller and a can of paint. What is the probability that the paint is latex?
Solution
L = {The customer purchases latex paint.}, P(L) = 0.75, S = {The customer
purchases semigloss paint.}, P(S) = 0.25 , R = {The customer purchases roller.}
P(R|L) =0.6 ,P(R|S) =0.3
P ( L R ) P ( R / L) P ( L) 0.6 × 0.75
P( L / R) 0.857
P( R) P( R) 0.6 × 0.75 0.3 × 0.25 40
Axioms of Probability
A.1: For every event A, 0 ≤ P(A) ≤1
A.2: P(S) = 1
41
Theorems of probability
P A P A P A P and P 0
Proof
S A A/
PS P A P A /
1 P A P A / by A.2
P A / 1 P A
42
Some Rules of Probability
(a) The Addition Rule:
Let A1 , A2 , A3 , , An be events of the sample space, S. Then
(i) P A1 A2 ) P( A1 ) P( A2 ) P( A1 A2 )
(ii) P A1 A2 A3 P( A1 ) P( A2 ) P( A3 ) P( A1 A2 ) P ( A1 A3 ) P ( A2 A3 )+ P A1 A2 A3
(i) P A1 A2 P( A1 ) P( A2 )
(ii) P A1 A2 A3 P( A1 ) P( A2 ) P( A3 )
P A1 A2 ...... An p( A1 ) P( A2 ) P A3 ......... P( An )
(iii)
43
(b) The Multiplication Theorem:
(i) P A1 A2 P ( A1 ) .P ( A2 / A1 )
(ii) P A1 A2 A3 P ( A1 ) .P ( A2 / A1 ) .P ( A3 / A1 A2 )
44
Application of Counting Techniques
ways.
Definitions:
• the number of permutations of n distinct objects, taken all together is:
Pk or P n , k
n!
n
, where k n
n k ! 47
• the number of permutations of n objects consisting of groups of
which n1 of the first group are alike, n 2 of the second group are
alike and so on for the kth group with n k objects which are
alike is:
n!
n1! n 2 ! n3 ! n k !
• Where n1 n 2 n3 n k n
48
Circular Permutations: Permutations that occur when objects are arranged in a
circle are called circular permutations.
n 1!
n!
n
Combination of Objects: A Combination is a selection of objects in which the
order of selection does not matter.
50