Download Probability Distributions

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

Probability wikipedia , lookup

Randomness wikipedia , lookup

Transcript
Probability
Distributions
(Session 04)
SADC Course in Statistics
Learning Objectives
At the end of this session you will be able to:
• solve basic problems concerning realvalued probability distributions.
• distinguish between discrete and
continuous random variables (r.v.’s).
• explain what is meant by a probability
distribution.
• calculate the population mean and variance
of a given distribution.
To put your footer here go to View > Header and Footer
2
Session Contents
In this session you will
• be introduced to the theory of probability
distributions.
• be shown how to build a firm foundation of
the theory of probability distributions in
preparation for applications in statistical
inference (Module H2).
• strengthen the mathematical skills that are
required to deal correctly with probability
ideas.
To put your footer here go to View > Header and Footer
3
Random variables
• In the previous two sessions we dealt with
probabilities of events.
• In practice events of interest are those
generated by random variables.
• A random variable is a variable that
associates outcomes in the sample space
with numerical values.
To put your footer here go to View > Header and Footer
4
An example – birth of a baby
Girl
Line showing
numerical scale
X
Boy
Sample space
0
1
The figure above depicts a random variable
X defined as
X=0
if outcome is a boy
X=1
if outcome is a girl
To put your footer here go to View > Header and Footer
5
A second example:
Often the outcomes are actual measurements.
Thus, we could have:
a random variable Y which records
measurements of weights (of say maize cobs)
into numbers with kilograms as units.
Outcomes of any experiment can be recorded
as real numbers by defining an appropriate
random variable.
We do this because it is easier to work with
numbers.
To put your footer here go to View > Header and Footer
6
Types of random variables
• A random variable is said to be discrete if
the set of possible values is countable.
Examples of discrete random variables are
those that records events on gender, family
size, number of traffic offenses, ...
• A random variable is said to be continuous
if the set of possible values is not countable.
Examples of continuous random variables
are those that record events such as weight,
height, time, etc ...
To put your footer here go to View > Header and Footer
7
Continuous to discrete?
• Continuous random variables can be mapped
into discrete random variables by grouping.
• For example, age X is a continuous random
variable since it is a measure of time since
birth.
• We can define a discrete random variable Y as
Y = 1 if 0≤X<5.
= 2 if 5≤X<10
= 3 if 10≤X<15
= etc.
• You cannot convert a discrete random variable
into a continuous one.
To put your footer here go to View > Header and Footer
8
Probability distributions
• A probability distribution is a table, a
function or a graph that presents possible
outcomes of a trial, say E (e.g. throw of a
die), together with their corresponding
probabilities.
• Note that the outcome probabilities must
sum to 1 since occurrence of E results in
exactly one outcome.
To put your footer here go to View > Header and Footer
9
An example
• The following is an example of a probability
distribution for the gender of a new born
child:
Outcome
Values (x) of a
random variable X
P(x)
Male
0
0.5
Female
1
0.5
Total
1
To put your footer here go to View > Header and Footer
10
Probability mass/density function
A probability distribution can sometimes be
specified using a function f called a
probability (mass/density) function.
The function f must satisfy the following
conditions:
1. f (x)  0 for all x.
2.
 f (x)  1
allx

or
 f (x)dx  1.

To put your footer here go to View > Header and Footer
11
Points to note:
The function P(x) of the slide 10 is a
probability mass function since it satisfies
the two conditions above.
Point 1 of slide 11 satisfies the first law of
probability, as it must since P(x) represents
a probability.
Point 2 of slide 11 indicates that the sum is
used if the set of values x is countable;
otherwise the integral applies.
To put your footer here go to View > Header and Footer
12
Expected values
The weighted “centre” of a probability
distribution is called the expected value
written E(X).
More formally the expected value of a random
variable X is defined as:
E( X )   xf ( x ),
in the discrete case.
allx

E( X ) 
 xf ( x)dx,
in the continuous case.

E(X) is also called the population mean and
is usually denoted by  .
To put your footer here go to View > Header and Footer
13
Example (i)
• If f(x) is given by
x
f(x) = Prob(x)
0
0.5
1
0.5
Total
1
then E(X) = 0(0.5) + 1(0.5) = 0.5
To put your footer here go to View > Header and Footer
14
Example (ii)
Let f(x) = 2x, for 0  x  1
1
E ( X )   xf ( x)dx
0
1
3 1
x
  2 x dx  2
3
0
2
0
2
 .
3
To put your footer here go to View > Header and Footer
15
Moments
• The k-th moment of a random variable X is
defined as:

E ( X )   x f ( x),
k
k
in the discrete case.
x 0

E( X k ) 
k
x
 f ( x)dx, in the continuous case.

The moments of a distribution characterize
the shape of a distribution. The notation k
is often used to denote the k-th moment.
To put your footer here go to View > Header and Footer
16
Class exercise
Suppose a coin is tossed twice.
(a) Write down the possible values for the
random variable X defined as:
X = number of heads that occur
(b) Prepare a table showing the probability
distribution function of X
(c) Use this table to determine the
expected value of X
To put your footer here go to View > Header and Footer
17
Measures of spread
• The variance of a random variable X is
defined as
Var( X )  E ( X   )  E ( X )   .
2
2
2
• Notice that E(X2) is the second moment of X.
• The variance of X is also called the
population variance and is denoted by 2.
• The square root of the variance is called the
standard deviation of X. It is denoted by .
To put your footer here go to View > Header and Footer
18
Patterns for differing variances
  0.25
2
 1
2
Note that the bigger the variance,
the larger is the spread.
To put your footer here go to View > Header and Footer
19
Skewness and kurtosis
• If the probability distribution is not
symmetrical about the mean it is said to be
skew. The distribution has a positive
skewness if the tail of high values is longer
than the tail of low values, and negative
skewness if the reverse is true.
• Kurtosis is a measure of the peakness of a
probability distribution. It is usually used as a
comparison with the normal distribution (see
later sessions) since a kurtosis of more than 3
indicates that the distribution has a higher
peak than the normal distribution.
To put your footer here go to View > Header and Footer
20
Cumulative probability distribution
• In many applications we want to calculate
probabilities of the type P(X≤k) or P(X>k)
instead of P(X=k).
• The probabilities P(X≤k) for k = 0, 1, 2, ..
provide an example of what is called the
cumulative distribution of a random
variable X.
• Here, the random variable X is discrete.
To put your footer here go to View > Header and Footer
21
Some results
• P(X>k) = 1 – P(X ≤k). This is a direct result
of the probability result that
P(Ac) = 1 – P(A).
• Similar results can be obtained for
continuous random variables.
That is, if a < b then the event {X ≤ a} is a
sub-event of the event {X ≤ b}.
Hence P(X ≤ a) < P(X ≤ b).
To put your footer here go to View > Header and Footer
22
Definition of F(x)
• The cumulative distribution at x, denoted
F(x), is formally defined as:
x
F ( x)   f ( y),
y 0
in the discrete case for a
positive random variable.
x
F ( x) 
 f ( y)dy,
in the continuous case

By definition, cumulative distribution is an
increasing function having certain
properties. These are shown below.
To put your footer here go to View > Header and Footer
23
Results concerning F(x)
• F (– ) = 0.
• F (+ ) = 1. This says that the total area
under the probability density function is 1.
• F(a) < F(b) for a<b.
Thus F is an increasing function.
• P( a < X ≤ b) = F(b) - F(a).
• P(X = x) = 0, for every point x if X is a
continuous random variable.
To put your footer here go to View > Header and Footer
24
An example using F(x) - discrete
A discrete r.v. X, representing the number of girls
in families with 5 children, has the foll: distn:
X = No. of girls
P(X=x)
0
0.03125
1
0.15625
2
0.31250
3
0.31250
4
0.15625
5
0.03125
F(x)
Complete
the table
with
values of
F(x)
What is the probability of 4 children or less?
To put your footer here go to View > Header and Footer
25
An example using F(x) - continuous
A continuous random variable r.v. X, has
probability density function given by
x
f ( x )  e ,x  0
What is its cumulative distribution function?
x
Answer:
F( x )   e dy  1  e
y
x
0
To put your footer here go to View > Header and Footer
26
Practical work follows to
ensure learning objectives
are achieved…
To put your footer here go to View > Header and Footer
27