Download Week4_Lecture 1_post

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
Transcript
Review of Ch15
In Ch15, we learned





General Addition Rule
Conditional Probability
General Multiplication Rule
Redefine the Independence
Tree diagram
Next, we are going to start Ch16 Random Variables
o
o
o
Definition of a random variable
Discrete random variables and continuous random variables
Expectation, variance and standard deviation of the random
variable
Ch16 Random Variables
 Let’s look at the following example first
Suppose you participate in a game of rolling a fair dice. If
you get a six, then you will win $4; if you get a five, then
you will win $2; if you get any other number, you will win
nothing. The cost for this game is $1 per time. Then
what’s your net income from this game?
Number you
Roll
Net Income
Probability
6
$4 - $1= $ 3
1/6
5
$2 - $1= $ 1
1/6
1,2,3,4
$0 - $1= - $1
4/6=2/3
Term 1: Random Variables
 A numerical value, which is based on the outcome of a
random event, is called a random variable.
e.g. The Net Income is a typical random variable.
 A random variable is usually denoted by a capital letter,
like X, Y or Z and so on.
 We denote the values that a random variable can take by
using the corresponding lower-case letter.
For example, if you are going to denote the random variable “Net
Income” by using X, then any particular value of the “Net Income”
will be denoted by x
Number you roll
Net Income x
Probability
6
$4 - $1= $ 3
1/6
5
$2 - $1= $ 1
1/6
1,2,3,4
$0 - $1= - $1
4/6=2/3
Term 1: Random Variables



If we can list all the outcomes, we might formally call
this random variable a discrete random variable.
Otherwise, we’d call it a continuous random variable.
e.g. The “Net Income” is a discrete random variable
The “Height” is a continuous random variable
The collection of all the possible values and the
probabilities that they occur is called the probability
model for the discrete random variable.
The probability that a particular outcome x will happen
is usually denoted by P(X=x) or P(x)
This is the probability
model for the random
variable “Net Income”
Net Income x
Probability P(X=x)
$3
1/6
$1
1/6
- $1
2/3
Term 1: Random Variables
Let’s try an example together
An insurance company offers a “death and disability” policy
that pays $10,000 when someone dies or $5,000 if
someone is permanently disabled. It charges a premium
of $50 a year for this benefit. Based on a report, the
death rate in any year is 1 out of every 1000 people, and
that another 2 out of 1000 suffer some kind of disability.
Question: Please figure out the probability model for the
company’s net payout in a given year.
Solution:

Net Payout
x
Probability P(x)
$10,000-$50=$9,950
1/1000=0.001
$5,000-$50=$4,950
2/1000=0.002
$0 - $50 = - $50
1-0.001-0.002=0.997
Term 1: Random Variables
Let’s try another example together
Suppose a random variable X has the following probability
model:
Q1: What are the all possible values of the
x
P(X=x)
random variable X?
1
0.1
A1: 1,3,5,6,8,10
3
0.2
Q2: P(X=3)= ? P(X=2)=? P(X≤ 5) = ?
5
0.15
P(2≤X<8) =?
P(X>7)=?
6
0.05
A2: P(X=3)=0.2 P(X=2)=0
8
0.3
P(X≤ 5) =0.1+0.2+0.15=0.45
10
0.2
P(2≤X<8) =0.2+0.15+0.05=0.4
P(X>7)=0.3+0.2=0.5

Term 2: Expectation
 The expectation of a random variable X is often denoted
by E(X) or
 The formula for computing the expectation of a discrete
random variable is given by
that is to multiply each possible value by the probability
that it occurs and find the sum.
 Sometimes, the expectation of a random variable is also
called the mean of the random variable
 Expectation gives us the measure of the center for the
values of a random variable w.r.t. the probability weight.
Term 2: Expectation
Let’s try an example together.
With the probability model of a random variable X,

please find:
Q1: E(X)
A1:
Q2:E(X2)
A2:
x
P(X=x)
1
0.1
3
0.2
5
0.15
6
0.05
8
0.3
10
0.2
Term 2: Expectation
 Let’s try one more example
Please find the expectation of the random variable X of
“Net Income” and also comment on the expectation.
Net Income x
Probability P(X=x)
$3
1/6
$1
1/6
- $1
2/3
Solution:
This tells you: Even though you can get some profit from
the game occasionally, you still can’t get any profit in
the long run.
Term 3: Standard Deviation

The variance of a random variable X is denoted by Var(X)
or . And the variance of a discrete random variable
given by
Var ( X ) = σ 2 = ∑ ( x − µ ) 2 P ( x) = E ( X 2 ) − [ E ( X )]2
i.e. variance is the expected value of those squared
deviations

The standard deviation of a random variable X is
denoted by SD(X) or
. And the standard deviation of
a discrete random variable is given by

The standard deviation is a measure of the spread of
the values of a random variable
 Var(X)=SD(X)2 or equivalently,
Term 2: Expectation
Let’s try one example
Please find the variance and the standard deviation of the
random variable X of “Net Income”

Net Income x
Probability P(X=x)
$3
1/6
$1
1/6
- $1
2/3
Solution:
This is the variance
This is the standard
deviation
How to use TI to find E(X) and SD(X)?

σx
Net Income x
Probability P(X=x)
$3
1/6
$1
1/6
- $1
2/3
Please find the E(X) and
SD(X) by using TI.
More about E(X), Var(X) and SD(X)
 Shifting and Rescaling on a Random Variable
Shifting
Rescaling
Shifting will make all the
measures of center (like mean)
to be shifted, but keep all the
measures of spread (like the SD)
the same.
E(X+c)=E(X)+c
SD(X+c)=SD(X)
Var(X+c)=SD(X+c)2=SD(X)2=Var(X)
For example:
E(X+2)=E(X)+2
SD(X+2)=SD(X)
Var(X+2)=Var(X)
Rescaling will make both the
measures of center (like mean)
and the measures of spread
(like the SD) to be rescaled.
E(cX)=cE(X)
SD(cX)=|c|SD(X)
Var(cX)=SD(cX)2=|c|2 SD(X)2
=c2Var(X)
c is an arbitrary
constant (can be
positive, negative
or 0)
For example:
E(-2X)=-2E(X)
SD(-2X)=2SD(X)
Var(-2X)=4Var(X)
More about E(X), Var(X) and SD(X)
 Shifting and Rescaling on a Random Variable
If we consider the combination of the two transformations:
shifting and rescaling, we can get the following results:
E(aX+b)=E(aX)+b=aE(X)+b
SD(aX+b)=SD(aX)=|a|SD(X)
Var(aX+b)=Var(aX)=a2Var(X)
For example: Consider the mean ,SD , and Variance of -2X+3
E(-2X+3)=-2E(X)+3
SD(-2X+3)=2SD(x)
Var(-2X+3)=(-2)2Var(X)=4Var(X)
More about E(X), Var(X) and SD(X)
 Let’s try an example together
It’s determined that couples dining at the Quiet Nook can
expect Lucky Lovers discounts averaging $5.83 with a
standard deviation of $8.62. Suppose that for several
weeks the restaurant has also been distributing
coupons worth $5 off any one meal which can be used
together with Lucky Lovers discounts.
Question: If every couple dining there on the Valentine’s
Day brings a coupon, what are the mean and standard
deviation of the total discount each couple will receive?
More about E(X), Var(X) and SD(X)
 Let’s try an example together
Solution:
Let X be the Lucky Lover discount each couple receive
Then E(X)=$5.83, SD(X)=$8.62
Additionally with the $5 off any one meal coupon,
the total discount=Lucky Lover discount+one meal
diacount=X+5
Then E(X+5)=E(X)+5=5.83+5=$10.83 SD(X+5)=SD(X)=$8.62
More about E(X), Var(X) and SD(X)
 Let’s try an example together
On the Valentine’s Day at the Quite Nook, couples may get
a Lucky Lovers discount averaging $5.83 with a
standard deviation of $8.62. When two couples dine
together on a single check, the restaurant doubles the
discount offer.
Question: What are the mean and standard deviation of
discounts for such couples?
More about E(X), Var(X) and SD(X)
 Let’s try an example together
Solution:
Let X be the random variable of the Lucky Lover discount
that one couple could receive.
Then E(X)=$5.83 SD(X)=$8.62
When two couples dine on the same table,
the total discount is 2X
Then E(2X)=2E(X)=2*5.83=$11.66
and SD(2X)=2SD(X)=2*8.62=$17.24
More about E(X), Var(X) and SD(X)
 More than one variable
 For any two random variables X and Y
E(X±Y)=E(X) ±E(Y)
i.e. The expected value of the sum is the sum of the
expected values
 For two independent random variables X and Y
Var(X±Y)=Var(X) +Var(Y)
Then
More about E(X), Var(X) and SD(X)
 An application of the properties
Let’s look at the following example:
Jack and Sue want to compete their money investigation
skills. Each of them will buy two stocks.
Jack simply buy the two stocks from the same traded
company F5 Networks. Based on the price history, the
stock price for F5 Networks has the mean $22.09 and SD
$ 7.82
However, Sue buy one stock from F5 Networks and the
other one from the First Horizon company, an
independent company from F5 Networks, whose history
price mean and SD are the same as those of F5 Networks.
Question: Whose strategy is better?
More about E(X), Var(X) and SD(X)
 An application of the properties
Solution:
Let X be the random variable of the F5 stock price
Let Y be the random variable of the F.H. stock price
E(X)=E(Y)=$22.09 SD(X)=SD(Y)=$7.82
X and Y are independent random variables
For Jack, total stock price=2X
Since the SD for
E(2X)=2E(X)=2*$22.09=$44.18
Sue’s stocks is
SD(2X)=2SD(X)=2*$7.82=$15.64
smaller, we say
For Sue, total stock price=X+Y
Sue’s strategy is
better because her
E(X+Y)=E(X)+E(Y)=$22.09+$22.09=$44.18
stock price is more
stable.
More about E(X) and Var(X)
• Let’s try the following example together.
A grocery supplier believes that in a dozen eggs, the mean
number of broken ones is 0.6 with a standard deviation of
0.5 eggs. You buy 3 dozen eggs without checking them.
Assume the cartons are independent with each other.
Questions:
1) What is the expected number of broken eggs?
2) What is the standard deviation of the number of the
broken eggs?
More about E(X) and Var(X)
• Let’s try the following example together.
In a litter of six kittens, two are female. You pick two kittens
at random
Questions:
1) Create a probability model for the number of male kittens
you get.
2) What is the expected number of males you get?
3) What is the standard deviation ?