Download X - Studentportalen

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
Random Variables
Random Variable
●
●
Random variable:
–
is a real-valued function on a sample space
–
is denoted by a capital letter
Example:
–
Let X denotes the number of heads obtained in three tosses of
a coin then X is a random variable as below:
X (HHH)=3
X (HHT)=2
X (HTH)=2
X (HTT)=1
.. .
Random Variable
●
●
Random variables can be defined for both continuous and
discrete observations
A discrete random variable has a finite or countably infinite
number of possible values
●
●
Example:
–
Discrete: number of head in three tosses of a coin
–
Discrete: number of vowels in a word
–
Continuous: the area of an apartment
–
Continuous: the semantic similarity between two words
Probability Function
●
A probability function f over a random
variable X is:
f (x)= P ( X = x) where x is a value of X
●
Probability function is useful only for discrete
random variables
Probability Function (p.f.)
●
Example: let X denotes the number of heads
obtained in three tosses of a coin then the
probability function of X is:
f (x)=
{
1
8
3
8
3
8
1
8
x =0
x =1
x =2
x =3
Distribution Function
●
A distribution function F over a random
variable X is:
F (x)= P ( X ≤ x) where x is a value of X
●
Distribution function can be used for both
discrete and continuous random variables
Distribution Function (d.f.)
●
Example: let X denotes the number of heads
obtained in three tosses of a coin then the
distribution function of X is:
F (x)=
{
0
1
8
1
2
7
8
1
x<0
0≤ x <1
1≤ x < 2
2≤ x < 3
3≤ x
Properties of Distribution Function
F (−∞)= lim F (x)=0
x →−∞
F (+∞)= lim F ( x)=1
x →+∞
if x < y
then
F ( x)≤ F ( y)
F is continuous from the right at every point x
●
NOTE: any function with these properties is the
distribution function of some random variable
Estimating Probability through
Distribution Functions
P (x < X ≤ y)= F ( y)− F (x)
P (x < X < y)= lim F (t )− F ( x)
t→y
−
P (x ≤ X ≤ y)= F ( y)− lim F (t )
t → x−
P (x ≤ X < y)= lim F (t)− lim F (t)
t → y−
t → x−
Probability and Distribution Function
●
Example 4.1.3. We toss two dice. Let X be sum of the points
obtained. Then f(x) and F(x) are:
X=
2
3
4
5
6
7
8
9
10
11
12
f(X)
1/36
2/36
3/36
4/36
5/36
6/36
5/36
4/36
3/36
2/36
1/36
X in
(-∞,2)
[2,3)
[3,4)
[4,5)
[5,6)
[6,7)
[7,8)
[8,9)
[9,10)
F(X)
0
1/36
3/36
6/36
10/36
15/36
21/36
26/36
30/36
X in
[10,11)
[11,12)
[12,∞)
F(X)
33/36
35/36
1
Probability and Distribution Function
●
Ex. 4.1.2. Let X be the number of heads
obtained in five independent tosses of a fair
coin. Draw a histogram for its probability
function and a graph for its distribution function.
Well Known Discrete Random
Variables
●
●
●
A Bernoulli random variable X takes two
values {0,1}. The probability of taking 1 is p and
the probability of taking 0 is q=1-p
A Bernoulli experiment is a success/failure
experiment
Example: We toss a die. What is the probability
of obtaining 6?
Well Known Discrete Random
Variables
●
●
●
A binomial random variable measures the number of successes
in a sequence of n independent Bernoulli experiments.
Example: We toss a die three times. What is the probability of
obtaining two sixes?
If the probability of success in each experiment is p and the
probability of failure is q then the probability of X=x successes out
of n trials is
f (x)= n p x q (n− x )
x
()
if x =0,1,2,. . .
Well Known Discrete Random
Variables
●
●
The values of a discrete uniform random
variable occur with the same probability
Example: We toss a die. What is the probability
of obtaining each of the numbers from one to
six?
1
f ( X = x i )=
n
X ∈{x 1 , x 2 , … , x n }
Well Known Discrete Random
Variables
●
●
The values of a geometric random variable are equal
to the number of independent Bernoulli trials with
parameter p to obtain a success.
We throw a die repeatedly until a six comes up. Let X
be the number of throws. Find the probability function
of X.
P ( X =k )= pq k − 1
where
q=1− p
Exercises
●
Ex. 4.1.3
●
Ex. 4.1.5
●
Ex. 4.1.10
●
Ex. 4.1.12
Related documents