Questions tagged [density-function]

Probability density function (PDF) of a continuous random variable gives the relative probability for each of its possible values. Use this tag for discrete probability mass functions (PMFs) too.

Tag Usage

Use this tag when asking about probability functions in general, whether Probability density functions, or discrete probability mass functions (PMFs).

Overview

PDF stands for Probability Density Function; distinguished from CDF for Cumulative Distribution Function. A PDF describes the relative probability of a continuous random variable taking a given value. PMF stands for Probability Mass Function; it describes the probability of a discrete random variable taking a given value.

In case of continuous variables $X$, the PDF $\mathcal{P}_X(x)$ can be integrated over an interval $\mathcal{I}$ (or, more generally, any Borel set) to find the probability that the variable is in that interval:

$$\Pr(X \in \mathcal{I}) = \int_\mathcal{I} \mathcal{P}_X(x) dx.$$

Some common PDFs:

  • Normal: $f(x) = \frac{1}{\sqrt{2\pi\sigma^2}}\exp\left[-\frac{(x-\mu)^2}{2\sigma^2}\right]$

  • Gamma: $f(x) = \frac{\beta^{\alpha}}{\Gamma(\alpha)}x^{\alpha-1}\exp(-\beta x)$

Some common PMFs:

  • Binomial: $\Pr(X = x) = \frac{n!}{x!(n-x)!}p^x(1-p)^{n-x}$ for integral $n\ge 0.$

  • Bernoulli: $\Pr(X = x) = p^x (1-p)^{1-x}$ for $x\in \{ 0,1 \}.$

References

1521 questions
174
votes
6 answers

Can a probability distribution value exceeding 1 be OK?

On the Wikipedia page about naive Bayes classifiers, there is this line: $p(\mathrm{height}|\mathrm{male}) = 1.5789$ (A probability distribution over 1 is OK. It is the area under the bell curve that is equal to 1.) How can a value $>1$ be OK? I…
128
votes
10 answers

Why does the Cauchy distribution have no mean?

From the distribution density function we could identify a mean (=0) for Cauchy distribution just like the graph below shows. But why do we say Cauchy distribution has no mean?
85
votes
5 answers

What is the reason that a likelihood function is not a pdf?

What is the reason that a likelihood function is not a pdf (probability density function)?
John Doe
  • 1,275
  • 2
  • 15
  • 24
65
votes
4 answers

How do you calculate the probability density function of the maximum of a sample of IID uniform random variables?

Given the random variable $$Y = \max(X_1, X_2, \ldots, X_n)$$ where $X_i$ are IID uniform variables, how do I calculate the PDF of $Y$?
Mascarpone
  • 793
  • 1
  • 6
  • 7
54
votes
10 answers

Why is the sum of two random variables a convolution?

For long time I did not understand why the "sum" of two random variables is their convolution, whereas a mixture density function sum of $f(x)$ and $g(x)$ is $p\,f(x)+(1-p)g(x)$; the arithmetic sum and not their convolution. The exact phrase "the…
47
votes
3 answers

Are CDFs more fundamental than PDFs?

My stat prof basically said, if given one of the following three, you can find the other two: Cumulative distribution function Moment Generating Function Probability Density Function But my econometrics professor said CDFs are more fundamental…
44
votes
2 answers

Gamma vs. lognormal distributions

I have an experimentally observed distribution that looks very similar to a gamma or lognormal distribution. I've read that the lognormal distribution is the maximum entropy probability distribution for a random variate $X$ for which the mean and…
OSE
  • 1,057
  • 2
  • 10
  • 8
44
votes
3 answers

Intuitive explanation for density of transformed variable?

Suppose $X$ is a random variable with pdf $f_X(x)$. Then the random variable $Y=X^2$ has the pdf $$f_Y(y)=\begin{cases}\frac{1}{2\sqrt{y}}\left(f_X(\sqrt{y})+f_X(-\sqrt{y})\right) & y \ge 0 \\ 0 & y \lt 0\end{cases}$$ I understand the calculus…
lowndrul
  • 2,057
  • 1
  • 18
  • 20
41
votes
4 answers

Good methods for density plots of non-negative variables in R?

plot(density(rexp(100)) Obviously all density to the left of zero represents bias. I'm looking to summarize some data for non-statisticians, and I want to avoid questions about why non-negative data has density to the left of zero. The plots are…
generic_user
  • 11,981
  • 8
  • 40
  • 63
36
votes
2 answers

Can you explain Parzen window (kernel) density estimation in layman's terms?

Parzen window density estimation is described as $$ p(x)=\frac{1}{n}\sum_{i=1}^{n} \frac{1}{h^2} \phi \left(\frac{x_i - x}{h} \right) $$ where $n$ is number of elements in the vector, $x$ is a vector, $p(x)$ is a probability density of $x$, $h$ is…
32
votes
1 answer

Derivation of change of variables of a probability density function?

In the book pattern recognition and machine learning (formula 1.27), it gives $$p_y(y)=p_x(x) \left | \frac{d x}{d y} \right |=p_x(g(y)) | g'(y) |$$ where $x=g(y)$, $p_x(x)$ is the pdf that corresponds to $p_y(y)$ with respect to the change of the…
dontloo
  • 13,692
  • 7
  • 51
  • 80
28
votes
4 answers

How to determine quantiles (isolines?) of a multivariate normal distribution

I'm interested in how one can calculate a quantile of a multivariate distribution. In the figures, I have drawn the 5% and 95% quantiles of a given univariate normal distribution (left). For the right multivariate normal distribution, I am…
26
votes
2 answers

How to find/estimate probability density function from density function in R

Suppose that I have a variable like X with unknown distribution. In Mathematica, by using SmoothKernelDensity function we can have an estimated density function.This estimated density function can be used alongside with PDF function to calculate…
Amin
  • 459
  • 1
  • 4
  • 13
26
votes
1 answer

What does the y axis in a kernel density plot mean?

Possible Duplicate: Probability distribution value exceeding 1 is OK? I thought the area under the curve of a density function represents the probability of getting an x value between a range of x values, but then how can the y-axis be greater…
nachocab
  • 505
  • 1
  • 4
  • 10
26
votes
1 answer

Pdf of the square of a standard normal random variable

Given a known Gaussian distribution, $X \sim \mathcal N(\mu_x, \sigma_x^2)$, how does one determine the the distribution of $Y$ if $Y = X^2$?
1
2 3
99 100