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.
1,704
questions
183
votes
6
answers
124k
views
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 ...
143
votes
8
answers
114k
views
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?
105
votes
5
answers
55k
views
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)?
72
votes
4
answers
183k
views
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$?
70
votes
10
answers
73k
views
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 ...
51
votes
3
answers
8k
views
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 ...
50
votes
3
answers
9k
views
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 ...
50
votes
2
answers
34k
views
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 ...
46
votes
2
answers
46k
views
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 ...
45
votes
5
answers
39k
views
Why is the CDF of a sample uniformly distributed
I read here that given a sample $ X_1,X_2,...,X_n $ from a continuous distribution with cdf $ F_X $, the sample corresponding to $ U_i = F_X(X_i) $ follows a standard uniform distribution.
I have ...
45
votes
1
answer
39k
views
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 ...
42
votes
4
answers
17k
views
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 ...
31
votes
1
answer
73k
views
Pdf of the square of a general 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$?
31
votes
2
answers
96k
views
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 ...
29
votes
4
answers
20k
views
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 ...
27
votes
4
answers
30k
views
"The total area underneath a probability density function is 1" - relative to what?
Conceptually I grasp the meaning of the phrase "the total area underneath a PDF is 1". It should mean that the chances of the outcome being in the total interval of possibilities is 100%.
But I ...
27
votes
3
answers
111k
views
Finding the PDF given the CDF
How can I find the PDF (probability density function) of a distribution given the CDF (cumulative distribution function)?
27
votes
3
answers
15k
views
Why does a Cumulative Distribution Function (CDF) uniquely define a distribution?
I have always been told a CDF is unique however a PDF/PMF is not unique, why is that ? Can you give an example where a PDF/PMF is not unique ?
27
votes
1
answer
52k
views
What does the y axis in a kernel density plot mean? [duplicate]
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 ...
27
votes
3
answers
4k
views
Is there a Bayesian approach to density estimation
I am interested to estimate the density of a continuous random variable $X$. One way of doing this that I learnt is the use of Kernel Density Estimation.
But now I am interested in a Bayesian ...
23
votes
1
answer
6k
views
How many times must I roll a die to confidently assess its fairness?
(Apologies in advance for use of lay language rather than statistical language.)
If I want to measure the odds of rolling each side of a specific physical six-sided die to within about +/- 2% with a ...
22
votes
5
answers
11k
views
Does a univariate random variable's mean always equal the integral of its quantile function?
I just noticed that integrating a univariate random variable's quantile function (inverse cdf) from p=0 to p=1 produces the variable's mean. I haven't heard of this relationship before now, so I'm ...
22
votes
1
answer
3k
views
Marginal distribution of the diagonal of an inverse Wishart distributed matrix
Suppose $X\sim \operatorname{InvWishart}(\nu, \Sigma_0)$. I'm interested in the marginal distribution of the diagonal elements $\operatorname{diag}(X) = (x_{11}, \dots, x_{pp})$. There are a few ...
21
votes
3
answers
32k
views
Do the pdf and the pmf and the cdf contain the same information?
Do the pdf and the pmf and the cdf contain the same information?
For me the pdf gives the whole probability to a certain point(basically the area under the probability).
The pmf give the probability ...
21
votes
4
answers
68k
views
Difference between histogram and pdf?
If we want to visibly see the distribution of a continuous data, which one among histogram and pdf should be used?
What are the differences, not formula wise, between histogram and pdf?
21
votes
3
answers
179k
views
How to calculate the expected value of a standard normal distribution?
I would like to learn how to calculate the expected value of a continuous random variable. It appears that the expected value is $$E[X] = \int_{-\infty}^{\infty} xf(x)\mathrm{d}x$$ where $f(x)$ is the ...
21
votes
3
answers
8k
views
How is $\theta$, the polar coordinate, distributed when $(x,y) \sim U(-1,1) \times U(-1,1)$ vs. when $(x,y) \sim N(0,1)\times N(0,1)$?
Let the Cartesian $x,y$ coordinates of a random point be selected s.t. $(x,y) \sim U(-10,10) \times U(-10,10)$.
Thus, the radius, $\rho = \sqrt{x^2 + y^2}$, isn't uniformly distributed as implied by $...
21
votes
2
answers
2k
views
Is there an unbiased estimator of the Hellinger distance between two distributions?
In a setting where one observes $X_1,\ldots,X_n$ distributed from a distribution with density $f$, I wonder if there is an unbiased estimator (based on the $X_i$'s) of the Hellinger distance to ...
19
votes
4
answers
72k
views
How to find the mode of a probability density function?
Inspired by my other question, I would like to ask how does one find the mode of a probability density function (PDF) of a function $f(x)$?
Is there any "cook-book" procedure for this? Apparently, ...
19
votes
2
answers
1k
views
The pdf of $\frac{X_1-\bar{X}}{S}$
Suppose $X_1, X_2,...,X_n$ be i.i.d from $N(\mu,\sigma^2)$ with unknown $\mu \in \mathcal R$ and $\sigma^2>0$
Let $Z=\frac{X_1-\bar{X}}{S}$, where $S$ is the standard deviation here.
It can be ...
19
votes
1
answer
3k
views
Notation: What does the tilde below of the expectation mean? [duplicate]
I am reading about variational auto encoders, and there is the below loss function:
$$l_i(\Theta,\phi) = - {\mathbb{E}}_{z\sim q} \left[\log p_\phi(x_i|z)\right] + KL(q_{\phi}(z_i|x)||p(z))$$
What ...
18
votes
3
answers
43k
views
The sum of two independent gamma random variables
According to the Wikipedia article on the Gamma distribution:
If $X\sim\mathrm{Gamma}(a,\theta)$ and $Y\sim\mathrm{Gamma}(b,\theta)$, where $X$ and $Y$ are independent random variables, then $X+Y\sim ...
18
votes
4
answers
15k
views
How to calculate overlap between empirical probability densities?
I'm looking for a method to calculate the area of overlap between two kernel density estimates in R, as a measure of similarity between two samples. To clarify, in the following example, I would need ...
17
votes
4
answers
8k
views
Which to believe: Kolmogorov-Smirnov test or Q-Q plot?
I'm trying to determine if my dataset of continuous data follows a gamma distribution with parameters shape $=$ 1.7 and rate $=$ 0.000063.
The problem is when I use R to create a Q-Q plot of my ...
17
votes
2
answers
675
views
What's the distribution of $(a-d)^2+4bc$, where $a,b,c,d$ are uniform distributions?
I have four independent uniformly distributed variables $a,b,c,d$, each in
$[0,1]$. I want to calculate the distribution of $(a-d)^2+4bc$. I computed the distribution of $u_2=4bc$ to be $$f_2(u_2)=-\...
17
votes
5
answers
2k
views
What is the PDF for the minimum difference between a random number and a set of random numbers
I have a list (lets call it $ \{L_N\} $) of N random numbers $R\in(0,1)$ (chosen from a uniform distribution). Next, I roll another random number from the same distribution (let's call this number "b")...
16
votes
5
answers
27k
views
How to get ellipse region from bivariate normal distributed data?
I have data which looks like:
I tried to apply normal distribution (kernel density estimation works better, but I don't need such great precision) on it and it works quite well. Density plot makes a ...
16
votes
2
answers
3k
views
Does Wolfram Mathworld make a mistake describing a discrete probability distribution with a probability density function?
Usually a probability distribution over discrete variables is described using a probability mass function (PMF):
When working with continuous random variables, we describe probability distributions ...
16
votes
3
answers
5k
views
Where is density estimation useful?
After going through some slightly terse mathematics, I think I have a slight intuition of kernel density estimation. But I am also aware that estimating multivariate density for more than three ...
16
votes
2
answers
21k
views
Distribution of maximum of normally distributed random variables
I'm trying to find the closed-form CDF and PDF of $Y = \max(X_1, ..., X_n)$ where $X_i \sim \mathcal{N}(\mu_i, \sigma^2)$.
My thought process so far:
$$
\begin{align*}
F_Y(y) &= \mathbb{P}(\max(...
16
votes
4
answers
15k
views
Area under the "pdf" in kernel density estimation in R
I am trying to use the 'density' function in R to do kernel density estimates. I am having some difficulty interpreting the results and comparing various datasets as it seems the area under the curve ...
16
votes
1
answer
46k
views
How to interpret height of density plot
How should I interpret the height of density plots:
For example in the above plot, peak is at about 0.07 at x=18. Can I infer that about 7% of values are around 18? Can I be more specific than that? ...
16
votes
1
answer
2k
views
Linear transformation of a random variable by a tall rectangular matrix
Let's say we have a random vector $\vec{X} \in \mathbb{R}^n$, drawn from a distribution with probability density function $f_\vec{X}(\vec{x})$. If we linearly transform it by a full-rank $n \times n$ ...
15
votes
3
answers
8k
views
Closed form formula for distribution function including skewness and kurtosis?
Is there such a formula? Given a set of data for which the mean, variance, skewness and kurtosis is known, or can be measured, is there a single formula which can be used to calculate the probability ...
15
votes
4
answers
2k
views
Are the terms probability density function and probability distribution (or just "distribution") interchangeable?
Like the title says, are the terms probability density function and probability distribution (or just "distribution") interchangeable? If not, what is the difference?
15
votes
1
answer
12k
views
Is there an optimal bandwidth for a kernel density estimator of derivatives?
I need to estimate the density function based on a set of observations using the kernel density estimator. Based on the same set of observations, I also need to estimate the first and second ...
15
votes
1
answer
10k
views
Finding local extrema of a density function using splines
I am trying to find the local maxima for a probability density function (found using R's density method). I cannot do a simple "look around neighbors" method (where ...
15
votes
1
answer
409
views
Are there non-trivial settings where the MAD statistic has a closed-form density?
The MAD statistic of an iid sample $(x_1,\ldots,x_n)$ is defined as the median of the absolute deviation from the median:
$$
\text{mad}(x_1,\ldots,x_n)=\text{med}\left\{|x_i-\text{med}(x_1,\ldots,x_n)|...
14
votes
3
answers
3k
views
Whence the beta distribution?
As I'm sure everyone here knows already, the PDF of the Beta distribution $X \sim B(a,b)$ is given by
$f(x) = \frac{1}{B(a,b)}x^{a-1}(1-x)^{b-1}$
I've been hunting all over the place for an ...
14
votes
2
answers
1k
views
Why are density functions sometimes written with conditional notation?
I keep seeing density functions that don't explicitly arise from conditioning written with the conditional sign:
For example for the density of the Gaussian $N(\mu,\sigma)$ why write:
$$ f(x| \mu, \...