Download Lecture 9

Document related concepts
no text concepts found
Transcript
Probability Theory
Modelling random phenomena
Permutations
the number of ways that you can order n
objects is:
n! = n(n-1)(n-2)(n-3)…(3)(2)(1)
the number of ways that you can choose k
objects from n objects in a specific order:
n!
 n(n  1) (n  k  1)
n Pk 
(n  k )!
Definition: 0! = 1
Combinations
the number of ways that you can choose k
objects from n objects (order irrelevant) is:
n
n!
n Ck    
 k  k !(n  k )!
n(n  1) (n  k  1)

k (k  1) (1)
n
n!


n Ck  
 k  k!(n  k )!
 
are called Binomial Coefficients
Reason:
The Binomial Theorem
x  y 
n
C0 x y  n C1 x y
0
n

n
1
n 1
 n C2 x y
2
n2
   n Cn x y
n
0
 n  0 n  n  1 n1  n  2 n 2
 n n 0
   x y    x y    x y    x y
0
1
 2
 n
 x  y
2
 x  2 xy  y
2
2
 2
 2
 2
   1,    2,    1
0
1
 2
 x  y
3
 x  3x y  3xy  y
3
2
2
3
 3
 3
 3
 3
   1,    3,    3,    1
 0
1
 2
 3
 x  y
4
 x  4 x y  6 x y  4 xy  y
4
3
2
2
3
 4
 4
 4
 4
 4
   1,    4,    6,    4,    1
0
1
 2
 3
 4
4
Binomial Coefficients can also be
calculated using Pascal’s triangle
1
1 1
1 2 1
1 3 3 1
1 4 6 4 1
1 5 10 10 5 1
1 6 15 20 15 6 1
Random Variables
Probability distributions
Definition:
A random variable X is a number whose
value is determined by the outcome of a
random experiment (random phenomena)
Examples
1. A die is rolled and X = number of spots
showing on the upper face.
2. Two dice are rolled and X = Total number
of spots showing on the two upper faces.
3. A coin is tossed n = 100 times and
X = number of times the coin toss
resulted in a head.
4. A person is selected at random from a
population and
X = weight of that individual.
5. A sample of n = 100 individuals are
selected at random from a population (i.e.
all samples of n = 100 have the same
probability of being selected) .
X = the average weight of the 100
individuals.
In all of these examples X fits the definition
of a random variable, namely:
– a number whose value is determined by the
outcome of a random experiment (random
phenomena)
Random variables are either
• Discrete
– Integer valued
– The set of possible values for X are integers
• Continuous
– The set of possible values for X are all real
numbers
– Range over a continuum.
Discrete Random Variables
Discrete Random Variable: A random variable
usually assuming an integer value.
• a discrete random variable assumes values that are
isolated points along the real line. That is neighbouring
values are not “possible values” for a discrete random
variable
Note: Usually associated with counting
• The number of times a head occurs in 10 tosses of a coin
• The number of auto accidents occurring on a weekend
• The size of a family
Examples
• Discrete
– A die is rolled and X = number of spots
showing on the upper face.
– Two dice are rolled and X = Total
number of spots showing on the two
upper faces.
– A coin is tossed n = 100 times and X =
number of times the coin toss resulted
in a head.
Continuous Random Variables
Continuous Random Variable: A quantitative random
variable that can vary over a continuum
• A continuous random variable can assume any value
along a line interval, including every possible value
between any two points on the line
Note: Usually associated with a measurement
• Blood Pressure
• Weight gain
• Height
Examples
• Continuous
–
–
A person is selected at random from a
population and X = weight of that individual.
A sample of n = 100 individuals are selected
at random from a population (i.e. all samples
of n = 100 have the same probability of being
selected) . X = the average weight of the 100
individuals.
Probability distribution of a
Random Variable
The probability distribution of a
discrete random variable is describe
by its :
probability function p(x).
p(x) = the probability that X takes on
the value x.
Probability Distribution & Function
Probability Distribution: A mathematical
description of how probabilities are distributed with
each of the possible values of a random variable.
Notes:

The probability distribution allows one to determine probabilities
of events related to the values of a random variable.

The probability distribution may be presented in the form of a
table, chart, formula.
Probability Function: A rule that assigns probabilities to
the values of the random variable
Comments:
Every probability function must satisfy:
1. The probability assigned to each value of the
random variable must be between 0 and 1,
inclusive:
0  p( x)  1
2. The sum of the probabilities assigned to all the
values of the random variable must equal 1:
 p( x)  1
x
b
3. Pa  X  b   p( x)
x a
 p(a)  p(a  1)    p(b)
Examples
• Discrete
– A die is rolled and X = number of spots
showing on the upper face.
x
1
p(x) 1/6
2
1/6
3
1/6
4
1/6
5
1/6
6
1/6
– Two dice are rolled and X = Total
number of spots showing on the two
upper faces.
x
2
3
4
5
6
7
8
9
10
11
12
p(x) 1/36 2/36 3/36 4/36 5/36 6/36 5/36 4/36 3/36 2/36 1/36
Graphs
To plot a graph of p(x), draw bars of height
p(x) above each value of x.
Rolling a die
0
1
2
3
4
5
6
Rolling two dice
0
Example
In baseball the number of individuals, X, on base when a
home run is hit ranges in value from 0 to 3. The
probability distribution is known and is given below:
x
p(x)
0
6/14
1
4/14
2
3/14
3
1/14
Note:
 This chart implies the only values x takes on are 0, 1, 2, and 3.
 If the random variable X is observed repeatedly the probabilities,
p(x), represents the proportion times the value x appears in that
sequence.
3


P( the random variable X equals 2) p (2)
14
3 1
4
Pthe random variable X is at least 2  p2  p3   
14 14 14
A Bar Graph
0.500
0.429
No. of persons on base
when a home run is hit
0.400
0.286
p(x)
0.300
0.214
0.200
0.100
0.071
0.000
0
1
2
# on base
3
Note: In all of the examples
1. 0  p(x)  1
2.
 p x   1
x
b
3.
Pa  X  b   p( x)
x a
An Important discrete distribution
The Binomial distribution
Suppose we have an experiment with two
outcomes – Success(S) and Failure(F).
Let p denote the probability of S (Success).
In this case q=1-p denotes the probability of
Failure(F).
Now suppose this experiment is repeated n
times independently.
Let X denote the number of successes
occuring in the n repititions.
Then X is a random variable.
It’s possible values are
0, 1, 2, 3, 4, … , (n – 2), (n – 1), n
and p(x) for any of the above values of x is
given by:
 n x
 n  x n x
n x
px     p 1  p     p q
 x
 x
X is said to have the Binomial
distribution with parameters n and p.
Summary:
X is said to have the Binomial distribution
with parameters n and p.
1. X is the number of successes occurring in
the n repetitions of a Success-Failure
Experiment.
2. The probability of success is p.
3.
n
px     p 1  p 
 x
x
n x
Examples:
1. A coin is tossed n = 5 times. X is the
number of heads occuring in the 5 tosses
of the coin. In this case p = ½ and
 5  1 x 1 5 x  5  1 5  5  1
px     2   2     2     32 
 x
 x
 x
x
0
1
2
3
4
5
p(x)
1
32
5
32
10
32
10
32
5
32
1
32
Another Example
2. An eye surgeon performs corrective eye
surgery n = 10 times. The probability of
success is p = 0.92 (92%). Let X denote
the number of successful operations in the
10 cases.
10 
x
10  x
p  x     .92  .08
x
x  0,1, 2,3,
,8,9,10
10 
x
10  x
p  x     .92  .08
x
x
p(x)
x
p(x)
0
0.00000
6
0.00522
1
0.00000
7
0.03427
x  0,1, 2,3,
2
0.00000
8
0.14781
3
0.00000
9
0.37773
,8,9,10
4
0.00004
10
0.43439
5
0.00054
0.50
0.40
0.30
0.20
0.10
0
1
2
3
4
5
6
7
8
9
10
Continuous Random Variables
Continuous Random Variables
The probability distribution of a
continuous random variable is
described by its :
probability density curve f(x).
i.e. a curve which has the following
properties :
1.
2.
3.
f(x) is always positive.
The total are under the curve f(x) is one.
The area under the curve f(x) between a
and b is the probability that X lies between the
two values.
An Important continuous distribution
The Normal distribution
The normal distribution (with mean m and
standard deviation s) is a continuous distribution
with a probability density curve that is:
1. Bell shaped
2. Centered at the value of the mean m,
3. The spread is determined by the value of the
standard deviation s. The points of inflection
on the bell curve occur at m - s and m + s .
The graph of the Normal distribution
0.030
Points of
Inflection
0.025
0.020
0.015
0.010
0.005
0
20
40
m
s
m
60
m  80
s
100
120
Mean and Variance of a
Discrete Probability Distribution
• Describe the center and spread of a
probability distribution
• The mean (denoted by greek letter m (mu)),
measures the centre of the distribution.
• The variance (s2) and the standard deviation (s)
measure the spread of the distribution.
s is the greek letter for s.
Mean of a Discrete Random Variable
• The mean, m, of a discrete random variable x is found by
multiplying each possible value of x by its own
probability and then adding all the products together:
m   xpx 
x
 x1 px1   x2 px2     xk pxk 
Notes:

The mean is a weighted average of the values of X.

The mean is the long-run average value of the random
variable.

The mean is centre of gravity of the probability
distribution of the random variable
0.3
0.2
0.1
1
2
3
4
5
6
7
8
m
9
10
11
Variance and Standard Deviation
Variance of a Discrete Random Variable: Variance, s2, of a
discrete random variable x is found by multiplying each possible
value of the squared deviation from the mean, (x  m)2, by its own
probability and then adding all the products together:


s 2   x  m 2 px 
2
x


2
  x px   xpx 
x
x

  x 2 px  m 2
x
Standard Deviation of a Discrete Random Variable: The positive
square root of the variance:
s  s2
Example
The number of individuals, X, on base when a home run
is hit ranges in value from 0 to 3.
x
0
1
2
3
Total
p (x )
xp(x)
0.429
0.000
0.286
0.286
0.214
0.429
0.071
0.214
1.000
0.929
 p(x)  xp(x)
x
2
0
1
4
9
2
x p(x)
0.000
0.286
0.857
0.643
1.786
2
x
 p( x)
• Computing the mean:
m   xpx   0.929
x
Note:
• 0.929 is the long-run average value of the random
variable
• 0.929 is the centre of gravity value of the probability
distribution of the random variable
• Computing the variance:


s 2   x  m 2 px 
2
x


2
  x px   xpx 
x
x

 1.786  .929  0.923
2
• Computing the standard deviation:
s  s2
 0.923  0.961
The Binomial distribution
1. We have an experiment with two outcomes
– Success(S) and Failure(F).
2. Let p denote the probability of S (Success).
3. In this case q=1-p denotes the probability of
Failure(F).
4. This experiment is repeated n times
independently.
5. X denote the number of successes occuring in the
n repititions.
The possible values of X are
0, 1, 2, 3, 4, … , (n – 2), (n – 1), n
and p(x) for any of the above values of x is
given by:
 n x
 n  x n x
n x
px     p 1  p     p q
 x
 x
X is said to have the Binomial distribution
with parameters n and p.
Summary:
X is said to have the Binomial distribution with
parameters n and p.
1. X is the number of successes occurring in the n
repetitions of a Success-Failure Experiment.
2. The probability of success is p.
3. The probability function
n x
n x
px     p 1  p 
 x
Example:
1. A coin is tossed n = 5 times. X is the
number of heads occurring in the 5 tosses
of the coin. In this case p = ½ and
 5  1 x 1 5 x  5  1 5  5  1
px     2   2     2     32 
 x
 x
 x
x
0
1
2
3
4
5
p(x)
1
32
5
32
10
32
10
32
5
32
1
32
0.4
p (x )
0.3
0.2
0.1
0.0
1
2
3
4
number of heads
5
6
Computing the summary parameters for the
distribution – m, s2, s
x
0
1
2
3
4
5
Total
p (x )
0.03125
0.15625
0.31250
0.31250
0.15625
0.03125
1.000
 p(x)
xp(x)
0.000
0.156
0.625
0.938
0.625
0.156
2.500
 xp(x)
x
2
0
1
4
9
16
25
2
x p(x)
0.000
0.156
1.250
2.813
2.500
0.781
7.500
2
x
 p( x)
• Computing the mean:
m   xpx   2.5
x
• Computing the variance:


s 2   x  m 2 px 
2
x


2
  x px   xpx 
x
x

 7.5  2.5  1.25
2
• Computing the standard deviation:
s  s2
 1.25  1.118
Example:
• A surgeon performs a difficult operation
n = 10 times.
•
X is the number of times that the operation is
a success.
•
The success rate for the operation is 80%. In
this case p = 0.80 and
•
X has a Binomial distribution with n = 10 and
p = 0.80.
10 
x
10 x


px    0.80 0.20
x
Computing p(x) for x = 1, 2, 3, … , 10
x
p (x )
x
p (x )
0
0.0000
6
0.0881
1
0.0000
7
0.2013
2
0.0001
8
0.3020
3
0.0008
9
0.2684
4
0.0055
10
0.1074
5
0.0264
The Graph
0.4
p (x )
0.3
0.2
0.1
0
1
2
3
4
5
6
7
Number of successes, x
8
9
10
Computing the summary parameters for the distribution –
m, s2, s
x
0
1
2
3
4
5
6
7
8
9
10
Total
p (x )
0.0000
0.0000
0.0001
0.0008
0.0055
0.0264
0.0881
0.2013
0.3020
0.2684
0.1074
1.000
xp(x)
0.000
0.000
0.000
0.002
0.022
0.132
0.528
1.409
2.416
2.416
1.074
8.000
 xp(x)
x2
x 2 p(x)
0
1
4
9
16
25
36
49
64
81
100
0.000
0.000
0.000
0.007
0.088
0.661
3.171
9.865
19.327
21.743
10.737
65.600
2
x
 p( x)
• Computing the mean:
m   xpx   8.0
x
• Computing the variance:


s 2   x  m 2 px 
2
x


2
  x px   xpx 
x
x

 65.6  8.0  1.60
2
• Computing the standard deviation:
s  s2
 1.25  1.118
Related documents