Você está na página 1de 8

Probability density function

IQR
Q1

Q3

Q1 1.5 IQR

Q3 + 1.5 IQR

Median
4

2.698

0.6745

0.6745

2.698

mode
24.65%
4

50%
0

24.65%
1

50% 50%
15.73%
4

68.27%
0

median

15.73%
1

Boxplot and probability density function of a normal distribution


N(0, 2 ).

mean

In probability theory, a probability density function


(PDF), or density of a continuous random variable, is
a function that describes the relative likelihood for this
random variable to take on a given value. The probability
of the random variable falling within a particular range Geometric visualisation of the mode, median and mean of an
[1]
of values is given by the integral of this variables den- arbitrary probability density function.
sity over that rangethat is, it is given by the area under
the density function but above the horizontal axis and between the lowest and greatest values of the range. The 1 Example
probability density function is nonnegative everywhere,
Suppose a species of bacteria typically lives 4 to 6 hours.
and its integral over the entire space is equal to one.
[2]
The terms "probability distribution function" and "prob- What is the probability that a bacterium lives exactly 5
ability function"[3] have also sometimes been used to hours? The answer is actually 0%. Lots of bacteria live
denote the probability density function. However, this for approximately 5 hours, but there is negligible chance
use is not standard among probabilists and statisticians. that any given bacterium dies at exactly 5.0000000000...
In other sources, probability distribution function may hours.
be used when the probability distribution is dened as
a function over general sets of values, or it may refer
to the cumulative distribution function, or it may be a
probability mass function rather than the density. Further
confusion of terminology exists because density function
has also been used for what is here called the probability
mass function.[4]

Instead we might ask: What is the probability that the


bacterium dies between 5 hours and 5.01 hours? Lets
say the answer is 0.02 (i.e., 2%). Next: What is the probability that the bacterium dies between 5 hours and 5.001
hours? The answer is probably around 0.002, since this
is 1/10th of the previous interval. The probability that
the bacterium dies between 5 hours and 5.0001 hours is
1

probably about 0.0002, and so on.


In these three examples, the ratio (probability of dying
during an interval) / (duration of the interval) is approximately constant, and equal to 2 per hour (or 2 hour1 ).
For example, there is 0.02 probability of dying in the
0.01-hour interval between 5 and 5.01 hours, and (0.02
probability / 0.01 hours) = 2 hour1 . This quantity 2
hour1 is called the probability density for dying at around
5 hours.

FURTHER DETAILS

3 Formal denition
(This denition may be extended to any probability distribution using the measure-theoretic denition of probability.)

A random variable X with values in a measurable space


(X , A) (usually Rn with the Borel sets as measurable subsets) has as probability distribution the measure XP on
(X , A) : the density of X with respect to a reference
Therefore, in response to the question What is the prob- measure on (X , A) is the RadonNikodym derivative:
ability that the bacterium dies at 5 hours?", a literally correct but unhelpful answer is 0, but a better answer can
be written as (2 hour1 ) dt. This is the probability that f = dX P .
d
the bacterium dies within a small (innitesimal) window
of time around 5 hours, where dt is the duration of this
That is, f is any measurable function with the property
window.
that:
For example, the probability that it lives longer than 5
hours, but shorter than (5 hours + 1 nanosecond), is (2

hour1 )(1 nanosecond) 61013 (using the unit conPr[X

A]
=
dP
=
f d
version 3.61012 nanoseconds = 1 hour).
X 1 A
A

There is a probability density function f with f(5 hours) = for any measurable set A A .
2 hour1 . The integral of f over any window of time (not
only innitesimal windows but also large windows) is the
probability that the bacterium dies in that window.
3.1 Discussion

Absolutely continuous univariate


distributions

A probability density function is most commonly associated with absolutely continuous univariate distributions.
A random variable X has density fX, where fX is a nonnegative Lebesgue-integrable function, if:

Pr[a X b] =

fX (x) dx.

In the continuous univariate case above, the reference


measure is the Lebesgue measure. The probability mass
function of a discrete random variable is the density with
respect to the counting measure over the sample space
(usually the set of integers, or some subset thereof).
Note that it is not possible to dene a density with reference to an arbitrary measure (e.g. one can't choose the
counting measure as a reference for a continuous random
variable). Furthermore, when it does exist, the density is
almost everywhere unique.

4 Further details

Hence, if FX is the cumulative distribution function of X, Unlike a probability, a probability density function can
take on values greater than one; for example, the uniform
then:
distribution on the interval [0, ] has probability density
f(x) = 2 for 0 x and f(x) = 0 elsewhere.
x
The standard normal distribution has probability density
FX (x) =
fX (u) du,

and (if fX is continuous at x)

d
FX (x).
fX (x) =
dx

2
1
ex /2 .
f (x) =
2

If a random variable X is given and its distribution admits


a probability density function f, then the expected value
of X (if the expected value exists) can be calculated as

Intuitively, one can think of fX(x) dx as being the proba


bility of X falling within the innitesimal interval [x, x +
E[X] =
x f (x) dx.
dx].

3
Not every probability distribution has a density function:
the distributions of discrete random variables do not; nor
does the Cantor distribution, even though it has no discrete component, i.e., does not assign positive probability
to any individual point.

where x1 , , xn are the discrete values accessible to the


variable and p1 , , pn are the probabilities associated
with these values.

d
F (x) = f (x).
dx

6 Families of densities

This substantially unies the treatment of discrete and


continuous probability distributions. For instance, the
A distribution has a density function if and only if its above expression allows for determining statistical charcumulative distribution function F(x) is absolutely contin- acteristics of such a discrete variable (such as its mean,
uous. In this case: F is almost everywhere dierentiable, its variance and its kurtosis), starting from the formulas
and its derivative can be used as probability density:
given for a continuous distribution of the probability.

If a probability distribution admits a density, then the It is common for probability density functions (and
probability of every one-point set {a} is zero; the same probability mass functions) to be parametrizedthat is,
holds for nite and countable sets.
to be characterized by unspecied parameters. For exTwo probability densities f and g represent the same ample, the normal distribution is parametrized in terms
2
probability distribution precisely if they dier only on a of the mean and the variance, denoted by and respectively,
giving
the
family
of
densities
set of Lebesgue measure zero.
In the eld of statistical physics, a non-formal reformu1 x 2
lation of the relation above between the derivative of the
1
f (x; , 2 ) = e 2 ( ) .
cumulative distribution function and the probability den 2
sity function is generally used as the denition of the
probability density function. This alternate denition is It is important to keep in mind the dierence between the
domain of a family of densities and the parameters of the
the following:
family. Dierent values of the parameters describe difIf dt is an innitely small number, the probability that X ferent distributions of dierent random variables on the
is included within the interval (t, t + dt) is equal to f(t) dt, same sample space (the same set of all possible values of
or:
the variable); this sample space is the domain of the family of random variables that this family of distributions
describes. A given set of parameters describes a single
Pr(t < X < t + dt) = f (t) dt.
distribution within the family sharing the functional form
of the density. From the perspective of a given distribution, the parameters are constants, and terms in a den5 Link between discrete and con- sity function that contain only parameters, but not variables, are part of the normalization factor of a distribution
tinuous distributions
(the multiplicative factor that ensures that the area under
the densitythe probability of something in the domain
It is possible to represent certain discrete random vari- occurring equals 1). This normalization factor is outables as well as random variables involving both a con- side the kernel of the distribution.
tinuous and a discrete part with a generalized probability
Since the parameters are constants, reparametrizing a
density function, by using the Dirac delta function. For
density in terms of dierent parameters, to give a charexample, let us consider a binary discrete random variacterization of a dierent random variable in the famable having the Rademacher distributionthat is, taking
ily, means simply substituting the new parameter values
1 or 1 for values, with probability each. The density
into the formula in place of the old ones. Changing the
of probability associated with this variable is:
domain of a probability density, however, is trickier and
requires more work: see the section below on change of
variables.
1
f (t) = ((t + 1) + (t 1)).
2
More generally, if a discrete variable can take n dierent
values among real numbers, then the associated probability density function is:

f (t) =

i=1

pi (t xi ),

7 Densities associated with multiple variables


For continuous random variables X1 , , Xn, it is also
possible to dene a probability density function associated to the set as a whole, often called joint probability

DEPENDENT VARIABLES AND CHANGE OF VARIABLES

density function. This density function is dened as a


function of the n variables, such that, for any domain D
in the n-dimensional space of the values of the variables
X1 , , Xn, the probability that a realisation of the set
variables falls inside the domain D is

Pr (X1 , , XN

7.4 Example

This elementary example illustrates the above denition


of multidimensional probability density functions in the
simple case of a function of a set of two variables. Let
a 2-dimensional random vector of coordinates
us call R
in the quarter plane of
(X, Y): the probability to obtain R

D) =
fX1 , ,XN (x1 , , xN ) dx1positive
dxNx. and y is
D


If F(x1 , , xn) = Pr(X1 x1 , , Xn xn) is the
Pr
(X
>
0,
Y
>
0)
=
fX,Y (x, y) dx dy.
cumulative distribution function of the vector (X1 , ,
0
0
Xn), then the joint probability density function can be
computed as a partial derivative


F

f (x) =
x1 xn
n

8 Dependent variables and change


of variables

If the probability density function of a random variable X


is given as fX(x), it is possible (but often not necessary;
7.1 Marginal densities
see below) to calculate the probability density function
of some variable Y = g(X). This is also called a change
For i=1, 2, ,n, let fXi(xi) be the probability density
of variable and is in practice used to generate a random
function associated with variable Xi alone. This is called
variable of arbitrary shape fgX = fY using a known (for
the marginal density function, and can be deduced from
instance uniform) random number generator.
the probability density associated with the random variables X1 , , Xn by integrating on all values of the n 1 If the function g is monotonic, then the resulting density
function is
other variables:

fXi (xi ) =

7.2



d 1


f (x1 , , xn ) dx1 dxi1 dxi+1 dxn .fY (y) = (g (y)) fX (g 1 (y)).
dy

Independence

Here g1 denotes the inverse function.

This follows from the fact that the probability contained


Continuous random variables X1 , , Xn admitting a joint in a dierential area must be invariant under change of
density are all independent from each other if and only if variables. That is,

fX1 , ,Xn (x1 , , xn ) = fX1 (x1 ) fXn (xn ).

|fY (y) dy| = |fX (x) dx| ,


or

7.3

Corollary







d

dx
d
If the joint probability density function of a vector of n
fY (y) = fX (x) = (x) fX (x) = (g 1 (y)) fX (g 1 (y)) =
random variables can be factored into a product of n funcdy
dy
dy
tions of one variable
For functions which are not monotonic the probability
density function for y is
fX1 , ,Xn (x1 , , xn ) = f1 (x1 ) fn (xn ),
(where each is not necessarily a density) then the n variables in the set are all independent from each other, and
the marginal probability density function of each of them
is given by

fXi (xi ) =

fi (xi )
.
fi (x) dx


d

g 1 (y) fX (g 1 (y))
k

dy k

n(y)

k=1

where n(y) is the number of solutions in x for the equation


g(x) = y, and g1 k(y) are these solutions.
It is tempting to think that in order to nd the expected
value E(g(X)) one must rst nd the probability density

5
fgX of the new random variable Y = g(X). However,
rather than computing

fY (y) =

E(g(X)) =

yfg(X) (y) dy,

one may nd instead

E(g(X)) =

g(x)fX (x) dx.

fX1 (x1 )fX2 (x2 ) fXn (xn )(yG(x1 , x2

9 Sums of independent random


variables
See also: Convolution and List of convolutions of
probability distributions

The values of the two integrals are the same in all cases in
Not to be confused with Mixture distribution
which both X and g(X) actually have probability density
functions. It is not necessary that g be a one-to-one function. In some cases the latter integral is computed much The probability density function of the sum of two
more easily than the former.
independent random variables U and V, each of which
has a probability density function, is the convolution of
their separate density functions:

8.1

Multiple variables

The above formulas can be generalized to variables


(which we will again call y) depending on more than one
other variable. f(x1 , , xn) shall denote the probability
density function of the variables that y depends on, and
the dependence shall be y = g(x1 , , xn). Then, the resulting density function is

y=g(x1 , ,xn )

f (x1 , , xn )

dV
n
g
2
j=1 xj (x1 , , xn )

fU +V (x) =

fU (y)fV (x y) dy = (fU fV ) (x)

It is possible to generalize the previous relation to a sum


of N independent random variables, with densities U 1 ,
, UN:

fU1 ++UN (x) = (fU1 fUN ) (x)

This can be derived from a two-way change of variables


where the integral is over the entire (n1)-dimensional involving Y=U+V and Z=V, similarly to the example besolution of the subscripted equation and the symbolic dV low for the quotient of independent random variables.
must be replaced by a parametrization of this solution for
a particular calculation; the variables x1 , , xn are then
10 Products and quotients of indeof course functions of this parametrization.
This derives from the following, perhaps more intuitive
pendent random variables
representation: Suppose x is an n-dimensional random
variable with joint density f. If y = H(x), where H is a See also: Product distribution and Ratio distribution
bijective, dierentiable function, then y has density g:
( )

dx
g(y) = f (x) det
dy
with the dierential regarded as the Jacobian of the inverse of H, evaluated at y.

Given two independent random variables U and V, each


of which has a probability density function, the density of
the product Y=UV and quotient Y=U/V can be computed
by a change of variables.

10.1 Example: Quotient distribution

Using the delta-function (and assuming independence)


the same result is formulated as follows.
To compute the quotient Y=U/V of two independent ranIf the probability density function of independent random dom variables U and V, dene the following transformavariables Xi, i = 1, 2, n are given as fXi(xi), it is possible tion:
to calculate the probability density function of some variable Y = G(X1 , X2 , Xn). The following formula establishes a connection between the probability density func- Y = U /V
tion of Y denoted by fY(y) and fXi(xi) using the Dirac
delta function:
Z=V

12 BIBLIOGRAPHY

Then, the joint density p(Y,Z) can be computed by a This leads to:
change of variables from U,V to Y,Z, and Y can be derived by marginalizing out Z from the joint density.

The inverse transformation is

p(Y ) =

pU (Y Z) pV (Z) |Z| dZ

2 2
1
1 2
1
1
e 2 Y Z e 2 Z |Z| dZ
2
2


2
2
1
1 (Y +1)Z
=
e 2
|Z| dZ
2

1 1 (Y 2 +1)Z 2
=2
e 2
Z dZ
2
0

1 (Y 2 +1)u
e
du
=

0
]
1
(Y 2 +1)u
=
e
(Y 2 + 1)
u=0
1
=
(Y 2 + 1)

=
U =YZ
V =Z
The Jacobian matrix J(U, V |Y, Z) of this transformation
is
U

Y
V

Y

U
Z
V
Z


Z
=
0


Y
= |Z|.
1

Thus:

u = 12 Z 2

is paUstandard
distribution.
p(Y, Z) = p(U, V ) J(U, V |Y, Z) = p(U ) p(V ) J(U, V |Y,This
Z) =
(Y Z) pVCauchy
(Z) |Z|.
And the distribution of Y can be computed by
marginalizing out Z:

p(Y ) =

pU (Y Z) pV (Z) |Z| dZ

Note that this method crucially requires that the transformation from U,V to Y,Z be bijective. The above transformation meets this because Z can be mapped directly back
to V, and for a given V the quotient U/V is monotonic.
This is similarly the case for the sum U+V, dierence
U-V and product UV.
Exactly the same method can be used to compute the distribution of other functions of multiple independent random variables.

10.2

Example: Quotient of two standard


normals

Given two standard normal variables U and V, the quotient can be computed as follows. First, the variables have
the following density functions:
1
p(U ) = e
2

2
U2

V2
1
p(V ) = e 2
2
We transform as described above:

11 See also
12 Bibliography
Pierre Simon de Laplace (1812). Analytical Theory
of Probability.
The rst major treatise blending
calculus with probability theory,
originally in French: Thorie Analytique des Probabilits.
Andrei Nikolajevich Kolmogorov (1950). Foundations of the Theory of Probability.
The modern measure-theoretic
foundation of probability theory; the original German version
(Grundbegrie der Wahrscheinlichkeitsrechnung) appeared in
1933.
Patrick Billingsley (1979). Probability and Measure.
New York, Toronto, London: John Wiley and Sons.
ISBN 0-471-00710-2.
David Stirzaker (2003).
ISBN 0-521-42028-8.

Elementary Probability.

Chapters 7 to 9 are about continuous variables.


Y = U /V
Z=V

[1] AP Statistics Review - Density Curves and the Normal


Distributions. Retrieved 16 March 2015.

[2] Probability distribution function PlanetMath


[3] Probability Function at Mathworld
[4] Ord, J.K. (1972) Families of Frequency Distributions,
Grin. ISBN 0-85264-137-0 (for example, Table 5.1 and
Example 5.4)

13

External links

Ushakov, N.G. (2001), Density of a probability distribution, in Hazewinkel, Michiel, Encyclopedia of


Mathematics, Springer, ISBN 978-1-55608-010-4
Weisstein, Eric W., Probability density function,
MathWorld.

14

14
14.1

TEXT AND IMAGE SOURCES, CONTRIBUTORS, AND LICENSES

Text and image sources, contributors, and licenses


Text

Probability density function Source: http://en.wikipedia.org/wiki/Probability%20density%20function?oldid=651676461 Contributors:


AxelBoldt, The Anome, Fnielsen, Miguel~enwiki, Ryguasu, Michael Hardy, Kku, TakuyaMurata, Tiles, Jovan, Cyp, Rotem Dan,
Ruthiebabes, Dino, Benwing, Meduz, Henrygb, Bkell, Giftlite, Paul Pogonyshev, Wmahan, Chowbok, Pgan002, LiDaobing, Fangz, Piotrus, Rich Farmbrough, MisterSheik, Lankiveil, Janna Isabot, 3mta3, Tsirel, Jost Riedel, Freshraisin, Oleg Alexandrov, LOL, BlaiseFEgan, Ohanian, Mathbot, Srleer, Mattopia, NevilleDNZ, Chobot, DVdm, Roboto de Ajvol, YurikBot, Wavelength, Inike, Modify, Cmglee, Sbyrnes321, SmackBot, Mmernex, ThorinMuglindir, Riedl, Complexica, Rimoll, Khoikhoi, Dirk gently~enwiki, Autopilot, Loodog,
Disavian, Zelaron, A. Pichler, CBM, Winterfors, Tac-Tics, 137 0, Icek~enwiki, Cydebot, Krauss, Jayen466, Kn4sbs~enwiki, Mikewax,
Salgueiro~enwiki, Qwerty Binary, Gcm, RogierBrussee, A3nm, Tercer, Leyo, Policron, KudzuVine, Xavthius, VolkovBot, Je G., Tiaanvangraan, Sumansaurabh, Markhebner, Stigin, Tpb, SieBot, Gerakibot, ENRGO, Anchor Link Bot, Melcombe, Classicalecon, ClueBot,
UKoch, Letournp, L.tak, Qwfp, Tayste, Addbot, Darko.veberic, ChrisIsBelow, John G. Miles, LaaknorBot, WikiDreamer Bot, Skippy le
Grand Gourou, Luckas-bot, HuPi, Fraggle81, Jalal0, MassimoAr, AnomieBOT, Ciphers, Magicxcian, Omnipaedista, Damiano.varagnolo,
Citation bot 1, DrilBot, Stpasha, FoxBot, , Compvis, Duoduoduo, Marie Poise, Jowa fan, Sjoosse, Juliusfriedman, SporkBot, Theodds, Kamina, Rferreirapt, Mjbmrbot, ClueBot NG, CocuBot, Helpful Pixie Bot, Gar, Martin.hjelm, Blah314, Usmanbjg, Mark
viking, Faizan, Rferreira1204, A.Humy and Anonymous: 146

14.2

Images

File:Boxplot_vs_PDF.svg Source: http://upload.wikimedia.org/wikipedia/commons/1/1a/Boxplot_vs_PDF.svg License: CC BY-SA 2.5


Contributors:
File:Boxplot vs PDF.png Original artist:
Original uploader was Jhguch at en.wikipedia;
File:Loglogisticpdf_no-labels.svg Source: http://upload.wikimedia.org/wikipedia/commons/8/8f/Loglogisticpdf_no-labels.svg License:
CC BY-SA 3.0 Contributors:
Loglogisticpdf.svg Original artist: Loglogisticpdf.svg: Qwfp (talk)
File:Visualisation_mode_median_mean.svg Source:
http://upload.wikimedia.org/wikipedia/commons/3/33/Visualisation_mode_
median_mean.svg License: CC BY-SA 3.0 Contributors: Own work Original artist: Cmglee

14.3

Content license

Creative Commons Attribution-Share Alike 3.0

Você também pode gostar