Questions tagged [cdf]

CDF is an acronym for cumulative distribution function. While the pdf gives the probability density of each value of a random variable, the cdf (often denoted F(x)) gives the probability that the random variable will be less than or equal to a specified value.

A cumulative density function describes the probability that a real-valued random variable X with a given probability distribution will be found at a value less than or equal to x.

The cdf of a discrete random variable is the summation of the probability mass function (pmf) of that distribution. If the random variable is continuous, this turns out to be the integral of the probability density function (pdf).

enter image description here

In applied statistics, cdfs are important in comparing distributions, playing a role in plots (e.g., pp-plots), and hypothesis tests (e.g., the Kolmogorov-Smirnov test).

Strongly related to


Common Data Format

Please pay attention another acronym for CDF is describe in and here is the NASA link for more details.

341 questions
2
votes
0 answers

Getting x coordinate from sns.kdeplot

Question 1. I am trying to find a kde plot for my data I am trying to use the following commands import seaborn as sns ax = sns.kdeplot(students,cumulative = True) This gives the correct kde plot , but I cannot get the CDF x-coordinate for 0.8 ,…
2
votes
1 answer

How to plot pdf (probability density function) of 2 graphs in R

I'm trying to visualize the histogram of two distributions and then visualize the distribution in the same pdf graph. First of I'm trying to simulate 100 to 5000 draws from a normal distribution with µ = 6 och σ = 2. Attempt: x <-rnorm(n=100,…
Agent smith 2.0
  • 112
  • 2
  • 12
2
votes
2 answers

Precision of cdf in scipy.stats

I'm using chi2 distribution as a theoretical problem for a simulation system. For a given interval, I need to estimate this distribution as a PMF defined as the integral of the PDF inside that interval. This value should be near the value of the PDF…
Charles Brunet
  • 21,797
  • 24
  • 83
  • 124
2
votes
1 answer

R: probability / numerical integral of bivariate (or multivariate) kernel density

I am using the package ks for kernel density estimation. Here's an easy example: n <- 70 x <- rnorm(n) library(ks) f_kde <- kde(x) I am actually interested in the respective exceeding probabilities of my input data, which can be easily returned…
Felix Phl
  • 383
  • 1
  • 13
2
votes
1 answer

How to solve two symbolic equations with Normal CDF (pnorm) using R

I want to solve these two equations numerically using R Equation 1: pnorm((c2+1)/5)-pnorm((c1+1)/5) = 0.025 Equation 2: pnorm((c2-1)/5)-pnorm((c1-1)/5) = 0.025 I need to find the values for c1 and c2 I tried to use rSymPy and Ryacas but couldn't…
rbeginner
  • 43
  • 5
2
votes
1 answer

Calculate the cumulative distribution function using a different model

How can I calculate the cumulative distribution function using a different model ? I'm specifically referring to this function from scipy.stats import norm norm.cdf(1639651) Replacing he above fucntion with another one that can genearte the N50, α…
NNN
  • 41
  • 3
2
votes
2 answers

How to induce correlations between two inverse cumulative probability distributions in [r]?

I'd like to create a correlated inverse cumulative distribution. Currently for example I have two inverse distributions shown as follows but would like to induce a correlation of say -0.5 for example. Is there a way I can achieve…
Dal
  • 317
  • 1
  • 8
2
votes
1 answer

How to do generate some scenarios using a predicted cdf in Matlab or Python?

I have used Matlab but I also welcome python for the solution. I have a predicted CDF (i.e., CDF^) of a random variable Var and would like to generate N scenarios using this predicted CDF (CDF^). Here is what I have done. I would like to know if…
JES0
  • 43
  • 4
2
votes
1 answer

How can I plot cumulative plots with specific x values?

I was trying to find out, how to plot a cumulative distribution function (cdf) with specific x values but was not successful. For example, if the dataset is: x = [2.50 5.21 7.67 8.43 9.15 11.47 14.59 21.45]; y = [0.20 0.09 0.15 0.13 0.17 0.04 0.7…
MSJ
  • 23
  • 2
2
votes
1 answer

CDF in scipy pearson3 appears to be miss-defined

I'm trying to construct a distribution using scipy.stats.pearson3, but I'm running into inconsistent results when looking at the cumulative distribution function (or the survival function). As an example: scipy.stats.pearson3.cdf(-1, skew=0, loc=0,…
ecortazar
  • 1,382
  • 1
  • 6
  • 12
2
votes
1 answer

Histogram equalization without extreme values

Is it possible to make a histogram equalization without the extreme values 0 and 255? Specifically I have an image, in which many pixels are zero. More than half of all pixels are zero. So if I do a histogram equalization there I shift basically the…
gab
  • 165
  • 2
  • 8
2
votes
1 answer

Obtain the CDF of a Vine Copula (trivariate) in R

I'm aware that the "VineCopula" package has a RVinePDF function and a BiCopCDF function, however there is no RVineCDF function. I need to select and fit R-Vine Copulas to a subset of three variables with 40 observations in a dataset with 300+ levels…
2
votes
1 answer

Python: how to use glob and wildcard to open CDF files

I'm trying to open multiple .cdf files and store them in a dictonary, but when I try to use wildcard within the pycdf.CDF() command, this error is returned: spacepy.pycdf.CDFError: NO_SUCH_CDF: The specified CDF does not exist. The .cdf files have a…
Emmi Starr
  • 45
  • 1
  • 6
2
votes
0 answers

Testing First-Order Stochastic Dominance Using R

I ran simulation and generated two (random) variables: X and Y. I would like to test whether X first-order stochastically dominates Y in R. That is, how can I check whether X's empirical CDF is on the right side of Y's empirical CDF for all support?
user3509199
  • 141
  • 1
  • 1
  • 5
2
votes
1 answer

Calculating cumulative distribution of two samples

I was going through the a scipy code for ks test (2 sample) which calculates the maximum distance between CDF's of any two given samples. code for calculating the cumulative Distribution Function(CDF). I fail to understand the logic in the lines for…
RTM
  • 759
  • 2
  • 9
  • 22