Download Random Variables

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

Randomness wikipedia , lookup

Probability wikipedia , lookup

Probability interpretations wikipedia , lookup

Transcript
Random Variables
Suppose we toss a coin 3 times. Then our sample space is :
S = { HHH, HHT, HTH, THH, HTT, THT, TTH, TTT }
What if we are interested in the number of heads that
appear in our experiment ?
We will denote this variable by X
( So, X represents the number of heads )
In this example, X could be : 0, 1, 2, or 3
If the outcome of the experiment is HTH, then X = 2
X is called a random variable
Random Variables
• A random variable is a variable whose value is a numerical
outcome of a random phenomenon.
• These are usually denoted by a capital letter
• We are interested in random variables such as
the mean of a random sample.
There are two types of we will study intently :
• Discrete random variables
• Continuous random variables
Discrete Random Variables
A discrete random variable X has a finite number of
possible values. The probability distribution of X lists the
values and their probabilities.
Value of X
x1
x2
x3
...
xk
Probability
p1
p2
p3
...
pk
The probabilities pi must satisfy two requirements :
1) Every pi is between 0 and 1
2) p1 + p2 + p3 + … + pk = 1
Find the probability of an event by adding the pi’s of the
particular xi’s that make up the event.
Discrete Random Variables
Example : Jerry, Elaine, George, and Kramer are going to
have a contest. They are going to see who can be the master
of their domain for the longest amount of time.
Player
Probability
E
G
J
K
0.42
0.31
0.24
0.03
We can assign each Player a value.
E
0
G
1
J
2
K
3
Discrete Random Variables
Example : Jerry, Elaine, George, and Kramer are going to
have a contest. They are going to see who can be the master
of their domain for the longest amount of time.
Player
Probability
0
1
2
3
0.42
0.31
0.24
0.03
Q: What is the probability that George or Kramer will win?
A: P(Winner is 1 or 3) = P(X = 1) + P(X = 3)
= 0.31 + 0.03
= 0.34
Probability Histogram
Probability
0.5
0.4
0.3
0.2
0.1
0
1
2
Outcome
3
Example : Go back to the experiment of tossing a coin 3 times.
S = { HHH, HHT, HTH, THH, TTH, THT, HTT, TTT }
Q: What is P(TTH) ? 1/2 * 1/2 * 1/2 = 1/8
Note: This is an equally likely experiment.
Let X be the amount of heads that appears in our experiment.
Q: What is the probability of getting no heads ?
A: P(No Heads) = P(X = 0) = 1/8
Example : Go back to the experiment of tossing a coin 3 times.
S = { HHH, HHT, HTH, THH, TTH, THT, HTT, TTT }
Q: What is P(TTH) ? 1/2 * 1/2 * 1/2 = 1/8
Note: This is an equally likely experiment.
Let X be the amount of heads that appears in our experiment.
Q: What is the probability of getting two heads ?
A: P(2 Heads) = P(X = 2)
= P(HHT) + P(HTH) + P(THH)
= 1/8 + 1/8 + 1/8 = 3/8
Continuous Random Variable
Newman comes up to you and asks you to play a game.
He has picked a number between 0 and 1, and he wants
you to try and guess the number he has picked.
If we let Newman’s number be represented by X, what
is the probability you will guess his number ?
In other words, what is P(guess = X) ? 1 /  = 0
To be fair, we should assign you a range of numbers,
say 0.3 through 0.7
This gives us : P( 0.3 < X < 0.7 )
Q: How do we find this probability ?
Continuous Random Variable
Definition : A continuous random variable X takes all values
in an interval of numbers.
• The probability assigned to an event can be found by
assigning an area under a density curve.
• The probability distribution of X is described by a density
curve. The probability of an event is the area under the
curve and above the values of X that make up the event.
Definition : A uniform distribution is a distribution of
constant height.
Uniform Distributions
Example: Draw a uniform distribution over the interval
from 0 to 4 :
0.25
0
1
2
3
4
Uniform Distributions
Go back to Newman’s example:
• This is a uniform distribution over the interval
from 0 to 1
0
1
0
0.3
0.7
1
We assigned ourselves an interval to guess Newman’s number
We used the interval from 0.3 to 0.7
What is the probability we are correct ?
P( 0.3 < X < 0.7 ) = the shaded area =
0.4
0
0.2
0.4
0.8
1
What if we were given the ranges from 0 to 0.2 and from
0.4 to 0.8 ?
What is the probability that we have covered Newman’s pick?
P( 0 < X < 0.2
or
0.4 < X < 0.8) = 0.2 + 0.4 = 0.6
Non-Uniform Distributions
So, what if we don’t have a uniform distribution ?
We can solve these if we have a normal distribution.
Normal Distributions as Probability Distributions
Recall that N( , ) represents a normal distribution with
mean  and standard deviation .
To get a standard score ( z-score) :
Z=
X-

By standardizing our scores, we go from N( , ) to N(0, 1)
Example : The Soup Nazi charges, on the average, $4.50
for a cup of soup, and if you’re lucky, some bread, with a
standard deviation of $0.45.
4.50
What is the probability that our check will be more
than $5.00 ?
0.1335
0.8665
4.50
5.00
What is the probability that our check will be more
than $5.00 ?
P (X > 5 ) = 0.1335 = 13.35 %
Z=
5.00 - 4.50
0.45
= 1.11
Homework
41, 42, 44, 46, 47,
49, 50, 53, 54, 55