Download Chapter 4 and 5

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

History of statistics wikipedia , lookup

Statistics wikipedia , lookup

Probability wikipedia , lookup

Probability interpretations wikipedia , lookup

Randomness wikipedia , lookup

Transcript
Chapter 4 and 5
Probability and Discrete Random
Variables
McGraw-Hill/Irwin
Copyright © 2009 by The McGraw-Hill Companies, Inc. All Rights Reserved.
The Concept of Probability
• An experiment is any process of
observation with an uncertain outcome
The possible outcomes for an experiment
are called the experimental outcomes.
The set of all possible outcomes is called
the sample space of an experiment.
S=(1, 2, 3, 4, 5, 6)
• Probability is a measure of the chance
that an experimental outcome will occur
when an experiment is carried out
4-2
Probability
If E is an experimental outcome, then
P(E) denotes the probability that E will
occur and:
Conditions
1. 0  P(E)  1 such that:
•
If E can never occur, then P(E) = 0
•
If E is certain to occur, then P(E) = 1
2. The probabilities of all the experimental
outcomes must sum to 1
4-3
Complement
• The complement (Ā) of an event A is the
set of all sample space outcomes not in
A
• P(Ā) = 1 – P(A)
4-4
Mutually Exclusive
• A and B are mutually exclusive if they
have no sample space outcomes in
common
• In other words:
P(A∩B) = 0
4-5
Discrete Random Variables
5.1 Two Types of Random Variables
5.2 Discrete Probability Distributions
5.3 The Binomial Distribution
5.4 The Poisson Distribution
4-6
Two Types of Random Variables
• Random variable: a variable that assumes
numerical values that are determined by the
outcome of an experiment
– Discrete
– Continuous
• Discrete random variable: Possible values
can be counted or listed; doesn’t take values
on an interval of the real line.
– The number of defective units in a batch of 20
– Toss a coin. Let x=1 if we have a head, x=0 if we
have a tail
4-7
Random Variables
Continued
• Continuous random variable: May
assume any numerical value in one or
more intervals
– The waiting time for a credit card
authorization
– The interest rate charged on a business
loan
4-8
Discrete Probability Distributions
• The probability distribution of a
discrete random variable is a table,
graph or formula that gives the
probability associated with each
possible value that the variable can
assume
• Notation: Denote the values of the random
variable by x and the value’s associated
probability by p(x)
4-9
Discrete Probability Distribution
Properties
1. For any value x of the random
variable, 1 p(x)  0
2. The probabilities of all the events in
the sample space must sum to 1, that
is…
 px   1
all x
4-10
Example 5.3
Continued
Number of Radios Sold at Sound City
in a Week
Radios, x
0
1
2
3
4
5
Probability, p(x)
p(0) = 0.03
p(1) = 0.20
p(2) = 0.50
p(3) = 0.20
p(4) = 0.05
p(5) = 0.02
1.00
• p(x = 2)= 0.5
• p(x <2 )= 0.03+0.2=0.23
• p(X ≥ 3)= 0.2+0.05+0.02=0.27
4-11
Example 5.3
Continued
• What is the chance that two radios will
be sold in a week?
– p(x = 2) = 0.50
4-12
Example 5.3
Continued
• What is the chance that fewer than 2
radios will be sold in a week? Using the addition rule
– p(x < 2)
for the mutually
exclusive values of
the random variable.
= p(x = 0 or x = 1)
= p(x = 0) + p(x = 1)
= 0.03 + 0.20 = 0.23
• What is the chance that three or more
radios will be sold in a week?
– p(x ≥ 3)
= p(x = 3, 4, or 5)
= p(x = 3) + p(x = 4) + p(x = 5)
= 0.20 + 0.05 + 0.02 = 0.27
4-13
Expected Value of a Discrete Random
Variable
The mean or expected value of a
discrete random variable X is:
m X   x p x 
All x
m is the value expected to occur in the
long run and on average
4-14
Example 5.3: Number of Radios
Sold at Sound City in a Week
m X   x p x 
All x
• How many radios should be expected to be sold in a
week?
– Calculate the expected value of the number of radios sold, µX
Radios, x
Probability, p(x)
x p(x)
0
p(0) = 0.03
0  0.03 = 0.00
1
p(1) = 0.20
1  0.20 = 0.20
2
p(2) = 0.50
2  0.50 = 1.00
3
p(3) = 0.20
3  0.20 = 0.60
4
p(4) = 0.05
4  0.05 = 0.20
5
p(5) = 0.02
5  0.02 = 0.10
1.00
2.10
• On average, expect to sell 2.1 radios per week
4-15
Variance
• The variance is the average of the
squared deviations of the the random
variable from the expected value
• The variance of a discrete random
variable is:
2
X
   x  m X  p x 
2
All x
4-16
Standard Deviation
• The standard deviation is the square
root of the variance
X 
2
X
• The variance and standard deviation
measure the spread of the values of the
random variable from their expected
value
4-17
Example 5.7: Number of Radios
Sold at Sound City in a Week
2
X
Radios, x
0
1
2
3
4
5
   x  m X  p x 
2
All x
Probability, p(x)
p(0) = 0.03
p(1) = 0.20
p(2) = 0.50
p(3) = 0.20
p(4) = 0.05
p(5) = 0.02
1.00
(x - mX)2 p(x)
(0 – 2.1)2 (0.03) = 0.1323
(1 – 2.1)2 (0.20) = 0.2420
(2 – 2.1)2 (0.50) = 0.0050
(3 – 2.1)2 (0.20) = 0.1620
(4 – 2.1)2 (0.05) = 0.1805
(5 – 2.1)2 (0.02) = 0.1682
0.8900
4-18
Example 5.7
Continued
• Variance equals 0.8900
• Standard deviation is the square root of
the variance
• Standard deviation equals 0.9434
4-19
Calculation the mean and variance
• Roll a die. Suppose all outcomes are
equally possible.
4-20
The Binomial Distribution
•
The binomial experiment…
1. Experiment consists of n identical trials
2. Each trial results in either “success” or “failure”
3. Probability of success, p, is constant from trial to
trial
–
The probability of failure, q, is 1 – p
4. Trials are independent
•
If x is the total number of successes in n
trials of a binomial experiment, then x is a
binomial random variable
4-21
Binomial Distribution
Continued
• For a binomial random variable x, the
probability of x successes in n trials is given
by the binomial distribution:
n!
px  =
p x q n- x
x!n - x !
– n! is read as “n factorial” and n! = n × (n-1) × (n-2)
× ... × 1
– 0! =1
– Not defined for negative numbers or fractions
4-22
Mean and Variance of a Binomial
Random Variable
• If x is a binomial random variable with
parameters n and p (so q = 1 – p), then
– Mean m = n•p
– Variance 2x = n•p•q
– Standard deviation x = square root n•p•q
 X  npq
4-23
Example 5.10: Incidence of Nausea
after Treatment
• Let x be the number of Tails you have
after tossing a unfair coin ten times.
Assume the probability to get a head is
0.6.
• Find the probability that you get 5 Tails.
Given: n = 10; How to define ‘success’ for
tossing coin for this problem? Define tail as
success p =0.4; P(x = 2)=0.1209; n=10,
What are the mean of x, 10*0.4=4 variance of
x, 10*0.4*0.6=2.4, standard deviation of x?
Sqrt(2.4)=1.549
4-24