Probability distribution
Download
Report
Transcript Probability distribution
Probability distribution
Dr. Deshi Ye
College of Computer Science, Zhejiang University
[email protected]
1
Outline
Random variable
The Binomial distribution
The Hypergeometric Distribution
The Mean and the Variance of the a
Probability distribution.
2
Random variables
We concern with one number or a few
number that associated with the outcomes
of experiments.
EX. Inspection: number of defectives
road test: average speed and average
fuel consumption.
In the example of tossing dice, we are
interested in sum 7 and not concerned
whether it is (1,6) or (2, 5) or (3, 4) or (4,
3) or (5, 2) or (6, 1).
3
Definition
A random variable: is any function that
assigns a numerical value to each
possible outcome of experiments.
Discrete random variable: only a finite
or a countable infinity of values.
Otherwise, continuous random
variables.
4
Probability distribution
The probability distribution of the random variable: is
the probabilities that a random variable will take on
any one value within its range.
The probability distribution of a discrete random
variable X is a list of possible values of X together
with their probabilities
f ( x) P[ X x]
The probability distribution always satisfies the
conditions
f ( x) 0, and f ( x) 1
x
5
Checking probability distribution
x
Prob.
0
.26
1
.5
2
.22
3
.02
Another
1) f(x) = (x-2)/2, for x=1,2, 3, 4
2) H(x) =x2/25, x=0,1,2,3,4
6
Probability histogram & bar chart
7
8
Bar chart
9
Histogram
10
Histogram
11
Cumulative distribution
F(x): value of a random variable is
less than or equal to x.
F ( x) P( X x) f (t )
tx
12
EX.
x
Prob.
0
.26
1
.76
2
.98
3
1.0
13
Binomial Distribution
Foul Shot: 1. Min Yao (Hou) .862.
2. O’Neal Shaquille .422
The Question is: what is the probability
of them in two foul shots that they get
2 points, respectively?
14
Binomial distribution
Study the phenomenon that the
probability of success in repeat trials.
Prob. of getting x “success” in n trials,
otherwords, x “success” and n – x
failures in n attempt.
15
Bernoulli trials
1. There are only two possible outcomes for
each trial.
2. The probability of success is the same for
each trial.
3. The outcomes from different trials are
independent .
4’. There are a fixed number n of Bernoulli
trials conducted.
16
Let X be the random variable that
equals the number of success in n
trials. p and 1- p are the probability of
“success” and “failure”, the
probability of getting x success and nx failure is
p (1 p)
x
n x
17
Def. of Binomial Dist.
#number of ways in which we can
select the x trials on which there is to
be a success is n
x
Hence the probability distribution of
Binomial is
n x
b( x; n, p) p (1 p) n x
x
x 0,1,2,, n
18
Expansions
n
n x
n x
( p 1 p) p (1 p) b( x; n, p)
x 0 x
x 0
n
n
n
x
Binomial coefficient
19
Table 1
Table 1: Cumulative Binomial
distribution
x
B( x; n, p) b(k ; n, p)
k 0
b( x; n, p) B( x; n, p) B( x 1; n, p)
20
EX Solve
Foul shot example:
Here n=2, x=2, and
p=0.862 for Yao, and p=0.422 for
Shaq.
0
1
Yao
.02
.24
Shaq.
.33
.49
2
.74
.18
21
Bar Chats
22
Minitab for Binomial
23
24
25
26
Skewed distribution
Positively
skewed
27
Hypergeometric Distr.
Sampling with replacement
Sampling without replacement
28
Hyergeometric distr.
Sampling without replacement
The number of defectives in a sample of n
units drawn without replacement from a lot
containing N units, of which a are defectives.
Here: population is N, and a are total
defectives
Sampling n units, what is probability of x
defectives are found?
29
formulations
Hypergeometric distr.
a N a
x n x
h( x; n, a, N )
N
n
30
Discussion
Is Hypergeometric distribution a
Bernolli trial?
Answer: NO!
The first drawing will yield a defect
unit is a/N, but the second is (a 1)/(N-1) or a/(N-1).
31
EX
A shipment of 20 digital voice
recorders contains 5 that are
defective. If 10 of them are randomly
chosen for inspection, what is the
probability that 2 of the 10 will be
defective?
Solution: a=5, n=10, N=20, and x=2
h(2;10,5,20) 0.348
32
33
Expectation
Expectation: If the probability of
obtaining the amounts
a1, a2 ,, or ak are p1, p2 ,, and pk
then the mathematical expectation is
E a1 p1 a2 p2 an pn
34
Motivations
The expected value of x is a weighted
average of possible values that X can
take on, each value being weighted
by the probability that X assumes it.
Frequency interpretation
35
4.4 The mean and the variance
Mean and variance: two distributions
differ in their location or variation
The mean of a probability distribution
is simply the mathematical
expectation of a random variable
having that distribution.
Mean of discrete probability
distribution
x f ( x)
all x
Alternatively,
E (X )
36
EX
The mean of a probability distribution
measures its center in the sense of an
average.
EX: Find the mean number of heads
in three tosses.
Solution: The probabilities for 0, 1, 2,
or 3 heads are 1/8, 3/8, 3/8, and 1/8
1
8
3
8
3
8
1
8
0 1 2 3
3
2
37
Mean of Binomial distribution
Contrast: please calculate the
following
4
xb( x;4,0.5) ?
x 0
16
xb( x;16, 0.2) ?
x 0
16
xb( x;16, 0.8) ?
x 0
38
Mean of b()
Mean of binomial distribution:
n p
n
Proof.
n!
x
p x (1 p ) n x
x!(n x)!
x 0
n
np b( x 1; n 1; p )
x 1
m
np b( y; m, p )
y 0
np
39
Mean of Hypergeometric Distr.
a
n
N
Proof.
a N a
x
n
x
h( x; n, a, N )
N
n
n
xh( x; n, a, N )
x 0
Similar proof or using the following hints:
m s
m s
r 0 r k r
k
k
40
EX
5 of 20 digital voice records were
defectives ,find the mean of the prob.
Distribution of the number of
defectives in a sample of 10 randomly
chose for inspection.
Solution: n=10, a= 5, N=20. Hence
n
a
2.5
N
41
Expectation of a function of random
variable
Let X denote a random variable that
takes on any of the values -1,0,1
respective probabilities
P{x=-1}=0.2, P{x=0}=0.5,
P{x=1}=0.3
Compute E[X2]
Answer = 0.5
42
Proposition
If X is a discrete random variable that
takes on one of the value of xi, with
respective to probability p(xi), then for
any real-valued function g,
E ( g ( x)) g ( xi ) p( xi )
i
43
Variance of probability
Variance of a probability distribution
f(x), or that of the random variable X
which has that probability distribution,
as
( x ) f ( x)
2
2
all x
We could also denote it as
D(X )
44
Standard deviation
Standard deviation of probability
distribution
(x )
2
f ( x)
all x
45
Relation between Mean and
Variance
D( X ) E[(x ) ]
2
E[ x 2 x ]
2
2
E ( X ) ( E ( X ))
2
2
46
Ex.
Find the variance of the number of
heads in four tosses.
Solution:
4
1
2
1
4
6
(1 2) 2 (2 2) 2
16
16
16
4
2
2 1
(3 2) (4 2)
16
16
1
2 ( 0 2) 2
47
Variance of binomial distr.
Variance of binomial distribution:
n p (1 p)
2
Proof. Detailed proof after the section of disjoint probability distribution
48
Some properties of Mean
C is a constant, then E(C) = C.
X is a random variable and C is a constant
E(CX) = CE(X)
X and Y are two random variables, then
E(X+Y) = E(X)+E(Y)
If X and Y are independent random variables
E(XY) = E(X)E(Y)
49
Variance of hypergeometric distr.
a
a N n
n (1 )(
)
N
N N 1
2
50
K-th moment
K-th moment about the origin
k x f ( x)
k
all x
K-th moment about the mean
k ( x ) f ( x)
k
all x
51
Case study
Occupancy Problem
52
Homework
problems
53