Survey
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
Keep Life Simple!
We live and work and dream,
Each has his little scheme,
Sometimes we laugh; sometimes we cry,
And thus the days go by.
1
Random Variables
Types
of random variables
Expected values
Binomial and Normal
distributions
2
What Is a Random Variable?
The numerical outcome of a random
circumstance is called a random variable.
Eg. Toss a dice: {1,2,3,4,5,6}
Height of a student
A random variable (r.v.) assigns a number to
each outcome of a random circumstance.
Eg. Flip two coins: the # of heads
3
Types of Random Variables
A continuous random variable can take any
value in one or more intervals.
** give examples
A discrete random variable can take one of
a countable list of distinct values.
** give examples
4
Distribution of a Discrete R.V.
5
X = a discrete r.v.
k = a number X can take
The probability distribution function (pdf) of X
is:
P(X=k)
How to Find the Function pdf
1.
2.
3.
4.
5.
6
List all outcomes (simple events) in S
Find the probability for each outcome
Identify the value of X for each outcome
Find all outcomes for which X=k, for each
possible k
P(X=k) = the sum of the probabilities for all
outcomes for which X=k
Example: Flip a Coin 3 Times
** find pdf
** draw a plot of pdf
7
CDF of a R.V.
8
The cumulative distribution function (cdf) of X
is:
P(X<k)= sum of P(X=h) over h<k
Example: Flip a Coin 3 Times
** find cdf
** draw a plot of cdf
9
Important Features of a Distribution
10
Overall pattern
Center – mean
Spread – variance or standard deviation
Expected Value (Mean)
11
The expected value of X is the mean
(average) value from an infinite # of
observations of X
Finding Expected Value
X = a discrete r.v.
{ x1, x2, …} = all possible X values
pi is the probability X = xi where i = 1, 2, …
The expected value of X is:
E ( X ) xi pi
i
12
Example: Flip a Coin 3 Times
** find the mean value
13
Variance & Standard Deviation
Notations as before
Variance of X:
V ( X ) ( xi ) pi
2
2
i
Standard deviation (sd) of X:
2
(
x
)
pi
i
i
14
Example: Flip a Coin 3 Times
** find the variance and sd
15
Binomial Random Variables
16
Binomial experiments:
Repeat the same trial of two possible
outcomes (success or failure) n times
independently
The # of successes out of the n trials is
called a binomial random variable
Examples:
Flip a fair coin 3 times (or flip 3 fair coins)
The # of defective memory chips of 50 chips
An experimental
treatment for bird flu
Others?
17
PDF of a Binomial R.V.
p = the probability of success in a trial
n = the # of trials repeated independently
X = the # of successes in the n trials
For k = 0, 1, 2, …,n,
P(X=k) =
18
n!
k
nk
p (1 p)
k!(n k )!
Example: Pass or Fail
Suppose that for some reason, you are not
prepared at all for the today’s quiz. (The quiz is
made of 5 multiple-choice questions; each
has 4 choices and counts 20 points.)
You are therefore forced to answer these
questions by guessing. What is the probability
that you will pass the quiz (at least 60)?
19
Mean & Variance of a Binomial R.V.
Notations as before
Mean is
20
E ( X ) np
Variance is
V ( X ) np(1 p)
2
Distribution of a Continuous R.V.
The probability density function (pdf) for a
continuous r.v. X is a curve such that
P(a < X <b) =
the area under it over the interval [a,b].
21
Normal Distribution
22
The “model” distribution of a continuous r.v.
The r.v. with a normal distribution is called a
normal r.v.
The pdf of a normal r.v. looks like:
CDF of a Normal R.V.
X: a normal r.v. with mean and
standard deviation
F(a) = P(X < a)
= P( X a )
= see Table A.1
23
z score
Example
24
Suppose that the final scores of ST1000
students follow a normal distribution with =
70 and = 10. What is the probability that a
ST1000 student has final score 85 or above
(grade A)?
Between 75 and 85 (grade B)?
Below 50 (F)?