![Page 1: 1 Probability distribution Dr. Deshi Ye College of Computer Science, Zhejiang University yedeshi@zju.edu.cn](https://reader030.vdocuments.site/reader030/viewer/2022032705/56649d935503460f94a7a706/html5/thumbnails/1.jpg)
1
Probability distribution
Dr. Deshi YeCollege of Computer Science, Zhejiang University
![Page 2: 1 Probability distribution Dr. Deshi Ye College of Computer Science, Zhejiang University yedeshi@zju.edu.cn](https://reader030.vdocuments.site/reader030/viewer/2022032705/56649d935503460f94a7a706/html5/thumbnails/2.jpg)
2
Outline
Random variable
The Binomial distribution
The Hypergeometric Distribution
The Mean and the Variance of the a Probability distribution.
![Page 3: 1 Probability distribution Dr. Deshi Ye College of Computer Science, Zhejiang University yedeshi@zju.edu.cn](https://reader030.vdocuments.site/reader030/viewer/2022032705/56649d935503460f94a7a706/html5/thumbnails/3.jpg)
3
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).
![Page 4: 1 Probability distribution Dr. Deshi Ye College of Computer Science, Zhejiang University yedeshi@zju.edu.cn](https://reader030.vdocuments.site/reader030/viewer/2022032705/56649d935503460f94a7a706/html5/thumbnails/4.jpg)
4
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.
![Page 5: 1 Probability distribution Dr. Deshi Ye College of Computer Science, Zhejiang University yedeshi@zju.edu.cn](https://reader030.vdocuments.site/reader030/viewer/2022032705/56649d935503460f94a7a706/html5/thumbnails/5.jpg)
5
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
The probability distribution always satisfies the conditions
][)( xXPxf
( ) 0, ( ) 1x
f x and f x
![Page 6: 1 Probability distribution Dr. Deshi Ye College of Computer Science, Zhejiang University yedeshi@zju.edu.cn](https://reader030.vdocuments.site/reader030/viewer/2022032705/56649d935503460f94a7a706/html5/thumbnails/6.jpg)
6
Checking probability distribution
x 0 1 2 3
Prob. .26 .5 .22 .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
![Page 7: 1 Probability distribution Dr. Deshi Ye College of Computer Science, Zhejiang University yedeshi@zju.edu.cn](https://reader030.vdocuments.site/reader030/viewer/2022032705/56649d935503460f94a7a706/html5/thumbnails/7.jpg)
7
Probability histogram & bar chart
![Page 8: 1 Probability distribution Dr. Deshi Ye College of Computer Science, Zhejiang University yedeshi@zju.edu.cn](https://reader030.vdocuments.site/reader030/viewer/2022032705/56649d935503460f94a7a706/html5/thumbnails/8.jpg)
8
![Page 9: 1 Probability distribution Dr. Deshi Ye College of Computer Science, Zhejiang University yedeshi@zju.edu.cn](https://reader030.vdocuments.site/reader030/viewer/2022032705/56649d935503460f94a7a706/html5/thumbnails/9.jpg)
9
Bar chart
![Page 10: 1 Probability distribution Dr. Deshi Ye College of Computer Science, Zhejiang University yedeshi@zju.edu.cn](https://reader030.vdocuments.site/reader030/viewer/2022032705/56649d935503460f94a7a706/html5/thumbnails/10.jpg)
10
Histogram
![Page 11: 1 Probability distribution Dr. Deshi Ye College of Computer Science, Zhejiang University yedeshi@zju.edu.cn](https://reader030.vdocuments.site/reader030/viewer/2022032705/56649d935503460f94a7a706/html5/thumbnails/11.jpg)
11
Histogram
![Page 12: 1 Probability distribution Dr. Deshi Ye College of Computer Science, Zhejiang University yedeshi@zju.edu.cn](https://reader030.vdocuments.site/reader030/viewer/2022032705/56649d935503460f94a7a706/html5/thumbnails/12.jpg)
12
Cumulative distribution
F(x): value of a random variable is less than or equal to x.
xt
tfxXPxF )()()(
![Page 13: 1 Probability distribution Dr. Deshi Ye College of Computer Science, Zhejiang University yedeshi@zju.edu.cn](https://reader030.vdocuments.site/reader030/viewer/2022032705/56649d935503460f94a7a706/html5/thumbnails/13.jpg)
13
EX.x 0 1 2 3
Prob. .26 .76 .98 1.0
![Page 14: 1 Probability distribution Dr. Deshi Ye College of Computer Science, Zhejiang University yedeshi@zju.edu.cn](https://reader030.vdocuments.site/reader030/viewer/2022032705/56649d935503460f94a7a706/html5/thumbnails/14.jpg)
14
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?
![Page 15: 1 Probability distribution Dr. Deshi Ye College of Computer Science, Zhejiang University yedeshi@zju.edu.cn](https://reader030.vdocuments.site/reader030/viewer/2022032705/56649d935503460f94a7a706/html5/thumbnails/15.jpg)
15
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.
![Page 16: 1 Probability distribution Dr. Deshi Ye College of Computer Science, Zhejiang University yedeshi@zju.edu.cn](https://reader030.vdocuments.site/reader030/viewer/2022032705/56649d935503460f94a7a706/html5/thumbnails/16.jpg)
16
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.
![Page 17: 1 Probability distribution Dr. Deshi Ye College of Computer Science, Zhejiang University yedeshi@zju.edu.cn](https://reader030.vdocuments.site/reader030/viewer/2022032705/56649d935503460f94a7a706/html5/thumbnails/17.jpg)
17
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 n-x failure is
xnx pp )1(
![Page 18: 1 Probability distribution Dr. Deshi Ye College of Computer Science, Zhejiang University yedeshi@zju.edu.cn](https://reader030.vdocuments.site/reader030/viewer/2022032705/56649d935503460f94a7a706/html5/thumbnails/18.jpg)
18
Def. of Binomial Dist.
#number of ways in which we can select the x trials on which there is to be a success is
Hence the probability distribution of Binomial is
x
n
xnx ppx
npnxb
)1(),;( nx ,,2,1,0
![Page 19: 1 Probability distribution Dr. Deshi Ye College of Computer Science, Zhejiang University yedeshi@zju.edu.cn](https://reader030.vdocuments.site/reader030/viewer/2022032705/56649d935503460f94a7a706/html5/thumbnails/19.jpg)
19
Expansions
n
x
n
x
xnxn pnxbppx
npp
00
),;()1()1(
x
n Binomial coefficient
![Page 20: 1 Probability distribution Dr. Deshi Ye College of Computer Science, Zhejiang University yedeshi@zju.edu.cn](https://reader030.vdocuments.site/reader030/viewer/2022032705/56649d935503460f94a7a706/html5/thumbnails/20.jpg)
20
Table 1
Table 1: Cumulative Binomial distribution
x
k
pnkbpnxB0
),;(),;(
),;1(),;(),;( pnxBpnxBpnxb
![Page 21: 1 Probability distribution Dr. Deshi Ye College of Computer Science, Zhejiang University yedeshi@zju.edu.cn](https://reader030.vdocuments.site/reader030/viewer/2022032705/56649d935503460f94a7a706/html5/thumbnails/21.jpg)
21
EX Solve
Foul shot example:Here n=2, x=2, and p=0.862 for Yao, and p=0.422 for
Shaq.
0 1 2
Yao .02 .24 .74
Shaq. .33 .49 .18
![Page 22: 1 Probability distribution Dr. Deshi Ye College of Computer Science, Zhejiang University yedeshi@zju.edu.cn](https://reader030.vdocuments.site/reader030/viewer/2022032705/56649d935503460f94a7a706/html5/thumbnails/22.jpg)
22
Bar Chats
![Page 23: 1 Probability distribution Dr. Deshi Ye College of Computer Science, Zhejiang University yedeshi@zju.edu.cn](https://reader030.vdocuments.site/reader030/viewer/2022032705/56649d935503460f94a7a706/html5/thumbnails/23.jpg)
23
Minitab for Binomial
![Page 24: 1 Probability distribution Dr. Deshi Ye College of Computer Science, Zhejiang University yedeshi@zju.edu.cn](https://reader030.vdocuments.site/reader030/viewer/2022032705/56649d935503460f94a7a706/html5/thumbnails/24.jpg)
24
![Page 25: 1 Probability distribution Dr. Deshi Ye College of Computer Science, Zhejiang University yedeshi@zju.edu.cn](https://reader030.vdocuments.site/reader030/viewer/2022032705/56649d935503460f94a7a706/html5/thumbnails/25.jpg)
25
![Page 26: 1 Probability distribution Dr. Deshi Ye College of Computer Science, Zhejiang University yedeshi@zju.edu.cn](https://reader030.vdocuments.site/reader030/viewer/2022032705/56649d935503460f94a7a706/html5/thumbnails/26.jpg)
26
![Page 27: 1 Probability distribution Dr. Deshi Ye College of Computer Science, Zhejiang University yedeshi@zju.edu.cn](https://reader030.vdocuments.site/reader030/viewer/2022032705/56649d935503460f94a7a706/html5/thumbnails/27.jpg)
27
Skewed distributionPositively skewed
![Page 28: 1 Probability distribution Dr. Deshi Ye College of Computer Science, Zhejiang University yedeshi@zju.edu.cn](https://reader030.vdocuments.site/reader030/viewer/2022032705/56649d935503460f94a7a706/html5/thumbnails/28.jpg)
28
Hypergeometric Distr.
Sampling with replacement Sampling without replacement
![Page 29: 1 Probability distribution Dr. Deshi Ye College of Computer Science, Zhejiang University yedeshi@zju.edu.cn](https://reader030.vdocuments.site/reader030/viewer/2022032705/56649d935503460f94a7a706/html5/thumbnails/29.jpg)
29
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 are defectives.
Here: population is N, and are total defectives
Sampling n units, what is probability of x defectives are found?
a
a
![Page 30: 1 Probability distribution Dr. Deshi Ye College of Computer Science, Zhejiang University yedeshi@zju.edu.cn](https://reader030.vdocuments.site/reader030/viewer/2022032705/56649d935503460f94a7a706/html5/thumbnails/30.jpg)
30
formulations
Hypergeometric distr.
n
N
xn
aN
x
a
Nanxh ),,;(
![Page 31: 1 Probability distribution Dr. Deshi Ye College of Computer Science, Zhejiang University yedeshi@zju.edu.cn](https://reader030.vdocuments.site/reader030/viewer/2022032705/56649d935503460f94a7a706/html5/thumbnails/31.jpg)
31
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).
![Page 32: 1 Probability distribution Dr. Deshi Ye College of Computer Science, Zhejiang University yedeshi@zju.edu.cn](https://reader030.vdocuments.site/reader030/viewer/2022032705/56649d935503460f94a7a706/html5/thumbnails/32.jpg)
32
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=2348.0)20,5,10;2( h
![Page 33: 1 Probability distribution Dr. Deshi Ye College of Computer Science, Zhejiang University yedeshi@zju.edu.cn](https://reader030.vdocuments.site/reader030/viewer/2022032705/56649d935503460f94a7a706/html5/thumbnails/33.jpg)
33
![Page 34: 1 Probability distribution Dr. Deshi Ye College of Computer Science, Zhejiang University yedeshi@zju.edu.cn](https://reader030.vdocuments.site/reader030/viewer/2022032705/56649d935503460f94a7a706/html5/thumbnails/34.jpg)
34
Expectation
Expectation: If the probability of obtaining the amounts
then the mathematical expectation is
kk pandppareaoraa ,,,,,, 2121
nn papapaE 2211
![Page 35: 1 Probability distribution Dr. Deshi Ye College of Computer Science, Zhejiang University yedeshi@zju.edu.cn](https://reader030.vdocuments.site/reader030/viewer/2022032705/56649d935503460f94a7a706/html5/thumbnails/35.jpg)
35
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
![Page 36: 1 Probability distribution Dr. Deshi Ye College of Computer Science, Zhejiang University yedeshi@zju.edu.cn](https://reader030.vdocuments.site/reader030/viewer/2022032705/56649d935503460f94a7a706/html5/thumbnails/36.jpg)
36
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
xall
xfx )(
)(XEAlternatively,
![Page 37: 1 Probability distribution Dr. Deshi Ye College of Computer Science, Zhejiang University yedeshi@zju.edu.cn](https://reader030.vdocuments.site/reader030/viewer/2022032705/56649d935503460f94a7a706/html5/thumbnails/37.jpg)
37
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
2
3
8
13
8
32
8
31
8
10
![Page 38: 1 Probability distribution Dr. Deshi Ye College of Computer Science, Zhejiang University yedeshi@zju.edu.cn](https://reader030.vdocuments.site/reader030/viewer/2022032705/56649d935503460f94a7a706/html5/thumbnails/38.jpg)
38
Mean of Binomial distribution
Contrast: please calculate the following
?)5.0,4;(4
0
x
xxb
16
0
( ;16,0.2) ?x
xb x
16
0
( ;16,0.8) ?x
xb x
![Page 39: 1 Probability distribution Dr. Deshi Ye College of Computer Science, Zhejiang University yedeshi@zju.edu.cn](https://reader030.vdocuments.site/reader030/viewer/2022032705/56649d935503460f94a7a706/html5/thumbnails/39.jpg)
39
Mean of b()
Mean of binomial distribution:
pn
Proof.
np
pmybnp
pnxbnp
ppxnx
nx
m
y
n
x
n
x
xnx
0
1
0
),;(
);1;1(
)1()!(!
!
![Page 40: 1 Probability distribution Dr. Deshi Ye College of Computer Science, Zhejiang University yedeshi@zju.edu.cn](https://reader030.vdocuments.site/reader030/viewer/2022032705/56649d935503460f94a7a706/html5/thumbnails/40.jpg)
40
Mean of Hypergeometric Distr.
N
an
Proof.
n
N
xn
aN
x
a
Nanxh ),,;(
n
x
Nanxxh0
),,;(
Similar proof or using the following hints:
k
sm
rk
s
r
mk
r 0
![Page 41: 1 Probability distribution Dr. Deshi Ye College of Computer Science, Zhejiang University yedeshi@zju.edu.cn](https://reader030.vdocuments.site/reader030/viewer/2022032705/56649d935503460f94a7a706/html5/thumbnails/41.jpg)
41
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
5.2N
an
![Page 42: 1 Probability distribution Dr. Deshi Ye College of Computer Science, Zhejiang University yedeshi@zju.edu.cn](https://reader030.vdocuments.site/reader030/viewer/2022032705/56649d935503460f94a7a706/html5/thumbnails/42.jpg)
42
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
![Page 43: 1 Probability distribution Dr. Deshi Ye College of Computer Science, Zhejiang University yedeshi@zju.edu.cn](https://reader030.vdocuments.site/reader030/viewer/2022032705/56649d935503460f94a7a706/html5/thumbnails/43.jpg)
43
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,
( ( )) ( ) ( )i ii
E g x g x p x
![Page 44: 1 Probability distribution Dr. Deshi Ye College of Computer Science, Zhejiang University yedeshi@zju.edu.cn](https://reader030.vdocuments.site/reader030/viewer/2022032705/56649d935503460f94a7a706/html5/thumbnails/44.jpg)
44
Variance of probability
Variance of a probability distribution f(x), or that of the random variable X which has that probability distribution, as
)()(22 xfx
xall
We could also denote it as )(XD
![Page 45: 1 Probability distribution Dr. Deshi Ye College of Computer Science, Zhejiang University yedeshi@zju.edu.cn](https://reader030.vdocuments.site/reader030/viewer/2022032705/56649d935503460f94a7a706/html5/thumbnails/45.jpg)
45
Standard deviation
Standard deviation of probability distribution
xall
xfx )()( 2
![Page 46: 1 Probability distribution Dr. Deshi Ye College of Computer Science, Zhejiang University yedeshi@zju.edu.cn](https://reader030.vdocuments.site/reader030/viewer/2022032705/56649d935503460f94a7a706/html5/thumbnails/46.jpg)
46
Relation between Mean and Variance
22
22
2
))(()(
]2[
])[()(
XEXE
xxE
xEXD
![Page 47: 1 Probability distribution Dr. Deshi Ye College of Computer Science, Zhejiang University yedeshi@zju.edu.cn](https://reader030.vdocuments.site/reader030/viewer/2022032705/56649d935503460f94a7a706/html5/thumbnails/47.jpg)
47
Ex.
Find the variance of the number of heads in four tosses.
Solution: 2
14
116
1)24(
16
4)23(
16
6)22(
16
4)21(
16
1)20(
22
2222
![Page 48: 1 Probability distribution Dr. Deshi Ye College of Computer Science, Zhejiang University yedeshi@zju.edu.cn](https://reader030.vdocuments.site/reader030/viewer/2022032705/56649d935503460f94a7a706/html5/thumbnails/48.jpg)
48
Variance of binomial distr.
Variance of binomial distribution:
)1(2 ppn
Proof. Detailed proof after the section of disjoint probability distribution
![Page 49: 1 Probability distribution Dr. Deshi Ye College of Computer Science, Zhejiang University yedeshi@zju.edu.cn](https://reader030.vdocuments.site/reader030/viewer/2022032705/56649d935503460f94a7a706/html5/thumbnails/49.jpg)
49
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)
![Page 50: 1 Probability distribution Dr. Deshi Ye College of Computer Science, Zhejiang University yedeshi@zju.edu.cn](https://reader030.vdocuments.site/reader030/viewer/2022032705/56649d935503460f94a7a706/html5/thumbnails/50.jpg)
50
Variance of hypergeometric distr.
)1
)(1(2
N
nN
N
a
N
an
![Page 51: 1 Probability distribution Dr. Deshi Ye College of Computer Science, Zhejiang University yedeshi@zju.edu.cn](https://reader030.vdocuments.site/reader030/viewer/2022032705/56649d935503460f94a7a706/html5/thumbnails/51.jpg)
51
K-th moment
K-th moment about the origin
K-th moment about the mean
xall
kk xfx )(
( ) ( )kk
all x
x f x
![Page 52: 1 Probability distribution Dr. Deshi Ye College of Computer Science, Zhejiang University yedeshi@zju.edu.cn](https://reader030.vdocuments.site/reader030/viewer/2022032705/56649d935503460f94a7a706/html5/thumbnails/52.jpg)
Case study
Occupancy Problem
52
![Page 53: 1 Probability distribution Dr. Deshi Ye College of Computer Science, Zhejiang University yedeshi@zju.edu.cn](https://reader030.vdocuments.site/reader030/viewer/2022032705/56649d935503460f94a7a706/html5/thumbnails/53.jpg)
53
Homework
problems