The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [pdf]

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
149
votes
6answers
77k 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 ...
37
votes
3answers
4k 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 ...
109
votes
10answers
69k 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?
36
votes
4answers
11k 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
10answers
29k 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 ...
22
votes
2answers
19k 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 ...
14
votes
3answers
34k 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, ...
57
votes
4answers
26k 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)?
11
votes
2answers
68k 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 ...
45
votes
4answers
85k 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$?
20
votes
4answers
19k 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 ...
17
votes
5answers
6k 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 ...
6
votes
4answers
5k views

What is the meaning of the density of a distribution at a point?

I know how to use PDFs to calculate probabilities, but I don't think I understand them. For example, at $X=0$ the PDF of the standard normal distribution is $\approx 0.4$. Does this have any useful ...
11
votes
5answers
22k 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 ...
17
votes
2answers
17k 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 ...
3
votes
2answers
2k views

How do you find a cutting point / strong slope within one-dimensional data

I have one-dimensional data. I want to find possible natural cutting points (strong slopes) within the data. For instance, if the data is ...
29
votes
2answers
16k 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 ...
24
votes
4answers
10k 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 ...
16
votes
4answers
4k 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
2answers
436 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)=-\...
3
votes
1answer
2k views

What is a density function?

I know about histograms and also know that if we connect the mid-points on the top of bars in a histogram we will get a frequency polygon. This polygon could then be 'smoothed' in a way that it ...
7
votes
2answers
4k views

Quantile intervals vs. highest posterior density intervals

I am reading a bit about Bayesian analysis, but I cannot understand the difference between the classic quantiles and the Highest Posterior Density Intervals. What is the difference between the two? I ...
7
votes
2answers
6k views

Why do a density plot and a rug plot seem to disagree?

The second peak of the density plot is large in this example. Why does the rug representation of the data--which seems to show few high values--not appear to match ...
1
vote
2answers
2k views

What does “probability distribution” mean?

I mean statements such as: "the probability distribution of X" or "its probability distribution". I am quite confused about such expressions. Could someone please explain the relationship between, ...
-3
votes
1answer
5k views

Deriving ordered statistics minimum cdf

Assume ${{X}_{1}}$, ${{X}_{2}}$, ${{X}_{3}}$,...,${{X}_{n}}$ are i.i.d. samples from distribution with density f, and cdf F. Let V=min( ${{X}_{1}}$, ${{X}_{2}}$, ${{X}_{3}}$,...,${{X}_{n}}$) To ...
8
votes
1answer
5k views

simple sampling method for a Kernel Density Estimator

I have developed a simple Kernel Density Estimator in Java, based on a few dozen points (maybe up to one hundred or so) and a Gaussian kernel function. The implementation gives me the PDF and CDF of ...
13
votes
3answers
18k 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 ...
11
votes
5answers
2k views

Probability that a continuous random variable assumes a fixed point

I'm in an introductory statistics class in which the probability density function for continuous random variables has been defined as $P\left\{X\in B\right\}=\int_B f\left(x\right)dx$. I understand ...
0
votes
2answers
2k views

Difference between joint density and density function of sum of two independent uniform random variables

I am not able to understand the difference between the joint density function and density function for a random variable $Z = X_1 + X_2$, where $X_1, X_2$ are uniform rvs in $[0,1]$. I think joint ...
8
votes
1answer
4k views

Maximum Likelihood Estimation of Inverse Gamma Distribution in R or RPy

I am trying to fit a three parameter inverse gamma distribution to my data in either R or Python. I would like to do this using maximum likelihood estimation (MLE). The pdf of the three parameter ...
6
votes
2answers
3k views

Is it possible to convert a Rayleigh distribution into a Gaussian distribution?

...and how might we do this? If possible, I am curious if outliers in the Rayleigh distributed data would also remain outliers in the new Gaussian distributed data. Thanks.
5
votes
2answers
503 views

general solution sum of two uniform random variables aY+bX=Z?

is there a general solution to that? I have seen simple examples for Y+X=Z but I was wondering how this would be with rescaling?
4
votes
1answer
610 views

marginal conditional distribution from MCMC output [duplicate]

I have a MCMC sampler that targets $$\mathbb{P}(U_1,U_2,...U_n \mid G(U) \leq 0)$$ where $U=(U_1,U_2,...U_n)^T$. I realize now I am more interested in estimating the conditional density $$p_k = p(u_k \...
2
votes
1answer
1k views

How do I estimate a smooth cdf from a set of observations?

I have a set of observation, let's call it $X$ and would like to fit a cdf to it. $X$ has a distribution which is roughly approximable with the normal distribution. This CDF should correspond to a ...
12
votes
1answer
17k views

Pdf of the square of a standard normal random variable [closed]

I have this problem where I must find the pdf of $Y = X^2$. All I know is that $X$ has the distribution $N(0,1)$. What kind of distribution is $Y = X^2$? Same as $X$? How do I find the pdf?
18
votes
4answers
47k 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?
20
votes
1answer
34k 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 ...
17
votes
3answers
21k 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 ...
14
votes
1answer
9k 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 ...
8
votes
5answers
2k views

Smooth a circular/periodic time series

I have data for motor vehicle crashes by hour of the day. As you would expect, they are high in the middle of the day and peak at rush-hour. ggplot2's default geom_density smooths it out nicely A ...
6
votes
2answers
332 views

In MLE for continuous rv, why is it ok to evaluate a pdf at a point?

In MLE for continuous case, my course notes define the likelihood function to be: $$ L(\theta) = L(\theta;y) = \prod_{i=1}^n f(y_i;\theta) $$ Where $f$ is the joint pdf of $y_i$ given $\theta$. I ...
8
votes
2answers
132 views

What is this “phenomenon” called?

Below is a histogram of some data, the bins are integers the other parameters are irrelevant. As you can see there seems to be two separate but overlapping normal distributions for odd and even ...
1
vote
2answers
18k views

Distribution function terminology (PDF, CDF, PMF, etc.) [duplicate]

I am confused about the following terminologies: Distribution Function Cumulative Distribution Function (CDF) Probability Distribution Function Probability Density Function Probability Mass Function (...
12
votes
3answers
5k 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 ...
10
votes
1answer
5k views

Interpretation of conditional density plots

I would like to know how to correctly interpret conditional density plots. I have inserted two below that I created in R with cdplot. For example, is the ...
7
votes
3answers
979 views

Fast density estimation

Suppose you are trying to estimate the pdf of a random variable $X$, for which there are tons of i.i.d. samples $\{X_i\}_{i=1}^{n}$ (i.e. $n$ is very large, think thousands - millions). One option is ...
5
votes
1answer
3k views

What is the minimum number of data points required for kernel density estimation?

What is the minimum number of data points required for a kernel density estimation to be considered non-misleading/acceptable/adequate? Is there a some rule based on how dispersed the data is? For ...
4
votes
1answer
3k views

PDF of cosine of a uniform random variable

There is a formula for the density of the cosine of random variable that's a uniform on $(-\pi,\pi)$ as discussed in this page: $f_{Y}(y) = \dfrac{1}{\pi \sin(\cos^{-1}y)}, y \in\ [-1,1]$ Can anyone ...
4
votes
1answer
256 views

Question about a marginal distribution

If I observe the following: $X \sim N(\mu_x,\sigma^2_x)$ $Y|X=x \sim N(x,\sigma^2_y)$ My objective is to calculate the marginal distribution of $Y$. (Since the variance term does not address some ...
3
votes
1answer
5k views

Multivariate log-normal probabiltiy density function (PDF)

The Multivariate Gaussian pdf is given by $$(2\pi)^{-\frac{K}{2}} \det(\Sigma)^{-\frac{1}{2}} \exp({-\frac{1}{2}}(X-\mu)' \Sigma^{-1} (X-\mu)) $$ The wikipedia for multivariate Gaussians is here ...