# 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,561 questions
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 ...
• 4,619
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?
• 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)?
• 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$?
• 793
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 ...
• 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 ...
• 3,733
45 votes
3 answers
7k views

• 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")...
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 ...
• 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 ...
• 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, ...
• 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 ...
• 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? ...
• 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 ...
• 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 ...
• 4,619
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 ...
• 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 ...
• 363
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 ...
• 2,122
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, \...
• 1,145
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 ...
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 ...
• 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, ...
• 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$ ...
• 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 ...
• 133