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.

Filter by
Sorted by
Tagged with
174 votes
6 answers
109k 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 ...
user avatar
131 votes
10 answers
97k 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?
user avatar
  • 5,849
89 votes
5 answers
44k 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)?
user avatar
  • 1,344
65 votes
4 answers
151k 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$?
user avatar
55 votes
10 answers
58k 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 ...
user avatar
  • 11.9k
49 votes
3 answers
7k 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 ...
user avatar
45 votes
3 answers
7k 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 ...
user avatar
  • 2,067
45 votes
2 answers
26k 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 ...
user avatar
  • 1,067
41 votes
2 answers
35k 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 ...
user avatar
  • 1,538
41 votes
4 answers
16k 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 ...
user avatar
  • 12.2k
33 votes
1 answer
23k 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 ...
user avatar
  • 14.1k
29 votes
4 answers
16k 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 ...
user avatar
27 votes
4 answers
27k 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 ...
user avatar
27 votes
3 answers
29k 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 ...
user avatar
27 votes
1 answer
46k 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 ...
user avatar
  • 515
26 votes
1 answer
56k views

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$?
user avatar
  • 371
26 votes
2 answers
89k 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 ...
user avatar
  • 459
25 votes
3 answers
98k 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)?
user avatar
25 votes
3 answers
3k 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 ...
user avatar
23 votes
1 answer
5k 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 ...
user avatar
  • 333
22 votes
3 answers
12k 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 ?
user avatar
  • 387
22 votes
1 answer
2k 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 ...
user avatar
  • 4,700
21 votes
5 answers
8k 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 ...
user avatar
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 ...
user avatar
  • 92.6k
20 votes
4 answers
61k 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?
user avatar
20 votes
3 answers
27k 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 ...
user avatar
  • 675
20 votes
3 answers
7k 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 $...
user avatar
  • 687
19 votes
3 answers
134k 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 ...
user avatar
  • 909
19 votes
2 answers
775 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 ...
user avatar
  • 4,527
18 votes
4 answers
13k 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 ...
user avatar
  • 455
17 votes
3 answers
32k 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 ...
user avatar
  • 173
17 votes
4 answers
7k 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 ...
user avatar
  • 599
17 votes
2 answers
561 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)=-\...
user avatar
  • 1,145
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")...
user avatar
17 votes
1 answer
2k 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 ...
user avatar
  • 841
16 votes
5 answers
26k 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 ...
user avatar
  • 315
16 votes
3 answers
59k 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, ...
user avatar
  • 909
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 ...
user avatar
  • 546
16 votes
1 answer
42k 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? ...
user avatar
  • 9,123
15 votes
3 answers
4k 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 ...
user avatar
  • 459
15 votes
3 answers
7k 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 ...
user avatar
15 votes
1 answer
11k 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 ...
user avatar
  • 923
15 votes
1 answer
9k 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 ...
user avatar
15 votes
2 answers
14k 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 ...
user avatar
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, \...
user avatar
14 votes
3 answers
2k 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 ...
user avatar
14 votes
1 answer
919 views

Why does MLE make sense, given the probability of an individual sample is 0?

This is kind of an odd thought I had while reviewing some old statistics and for some reason I can't seem to think of the answer. A continuous PDF tells us the density of observing values in any ...
user avatar
  • 243
14 votes
3 answers
6k views

Best way to put two histograms on same scale?

Let's say I have two distributions I want to compare in detail, i.e. in a way that makes shape, scale and shift easily visible. One good way to do this is to plot a histogram for each distribution, ...
user avatar
  • 7,475
14 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$ ...
user avatar
  • 281
13 votes
2 answers
980 views

Uniform PDF of the difference of two r.v

Is it possible to have the PDF of the difference of two iid r.v.'s look like a rectangle (instead of, say, the triangle we get if the r.v.'s are taken from the uniform distribution)? i.e. is it ...
user avatar
  • 133

1
2 3 4 5
32