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
1 answer

CDF - GoogleVis command for Cumulative Distribution plot

Does anybody know what command/function from the GoogleVis package I can use to plot cumulative distribution functions (CDFs)?
Malik
  • 71
  • 1
  • 9
2
votes
1 answer

python: finding the value of a random variable for a cdf

I apologize in advance if this is poorly worded. If I have a stdDev = 1, mean = 0, scipy.stats.cdf(-1, loc = 0, scale = 1) will give me the probability that a normally distributed random variable will be <= -1, and that is 0.15865525393145707.…
Alexander Kleinhans
  • 5,950
  • 10
  • 55
  • 111
2
votes
0 answers

Performance bottleneck because of high "erf" function use

I'm using large matrices (100x100 to 3000x3000) to do some claculations (a lot of sums and matrix-vector multiplications), I'm using the Eigen Library for my vectors and matrices. My code is simple C-like code (only functions, no classes) and is…
Naucle
  • 626
  • 12
  • 28
2
votes
2 answers

Inverse of the cumulative function of a lognormal distribution in C++

I'm looking for a function implementation (or library) in C++ that could calculate the value of the inverse of the cumulative function of a lognormal distribution. I had no luck finding it. Any help would be hugely appreciated!
Naucle
  • 626
  • 12
  • 28
2
votes
1 answer

Simulate birth with Rstudio - draw pmf and cdf

I have a little exercise to solve with Rstudio for my statistics exam. I tryed to translate it in english, so if something isn't clear please ask me for explanations. "Simulate 100,000 births and use the following probabilities: males 51.3%, females…
Gio Bact
  • 541
  • 1
  • 7
  • 23
2
votes
1 answer

plotting CDF plots for various arrays in a data frame

i can plot cummulative distribution plots for 3 data series using library(ggplot2) a1 <- rnorm(1000, 0, 3) a2 <- rnorm(1000, 1, 4) a3 <- rnorm(800, 2, 3) df <- data.frame(x = c(a1, a2, a3), ggg=factor(rep(1:3, c(1000,1000,800)))) …
saurabh
  • 391
  • 1
  • 2
  • 11
2
votes
1 answer

Matlab Kolmogorov-Smirnov Test

I'm using MATLAB to analyze some neuroscience data, and I made an interspike interval distribution and fit an exponential to it. Then, I wanted to check this fit using a Kolmogorov-Smirnov test with MATLAB. The data for the neuron spikes is just…
nphirning
  • 43
  • 1
  • 10
2
votes
2 answers

Errors running Maximum Likelihood Estimation on a three parameter Weibull cdf

I am working with the cumulative emergence of flies over time (taken at irregular intervals) over many summers (though first I am just trying to make one year work). The cumulative emergence follows a sigmoid pattern and I want to create a maximum…
Sara E
  • 31
  • 5
2
votes
1 answer

How to get cumulative distribution functions of a vector in Matlab using cumsum?

I want to get the probability to get a value X higher than x_i, which means the cumulative distribution functions CDF. P(X>=x_i). I've tried to do it in Matlab with this code. Let's assume the data is in the column vector p1. xp1 =…
Gohann
  • 155
  • 1
  • 12
2
votes
3 answers

Displaying markers on specific values in Gnuplot's line plot

I have data for a CDF in a file which looks like the following: 0.033 0.0010718113612 0.034 0.0016077170418 0.038 0.0021436227224 ... ... ... ... 0.847 0.999464094319 0.862 1.0 First column is the X-axis value and the second column is the CDF…
Zahaib Akhtar
  • 1,068
  • 2
  • 11
  • 26
2
votes
1 answer

Obtaining NaN for the CDF values of a normally distributed variable: Matlab

I can't seem to understand why my simple code given below doesn't work. I get NaN for the P_j values. % Plotting the CDF for normally distributed variable mu_j = 0.008; simga_j = -0.002; x= 0.008 -0.002*randn(100000,1); X_j = min(x) : (max(x) -…
user131983
  • 3,787
  • 4
  • 27
  • 42
2
votes
2 answers

R fitting an S-shaped or cumulative function to estimate values outside data range

I have some data points on % penetration of a product for a specific time window and i would like to estimate the "before and after" that time window using an S-shaped function that starts around %penetration=zero and ends around %penetration=1, so…
2
votes
1 answer

Plot density and cumulative density function in one combined plot using ggplot2

I would like to get a plot that combines the density of observations and the cdf. The usual problem with that is that the scales of the two are way off. How can this be remedied, i.e., two scales be used or, alternatively, one of the data series be…
Peter Lustig
  • 941
  • 11
  • 23
2
votes
1 answer

computing percentile rank efficently in R

I'm developing an R package which requires me to report percentile ranks for each of the returned values. However, the distribution I have is huge (~10 million values). The way I'm currently doing it is by generating an ecdf function, saving that…
Omar Wagih
  • 8,504
  • 7
  • 59
  • 75
2
votes
1 answer

Histogram matching for bias correction in Python

I am trying to find the inverse CDF of gamma function for the observed data, in order to find the transfer function. The whole aim is to correct the bias in the simulated data by CDF matching CDFobs(y) = CDFsim(x). I tried to do it with the below…
user1142937
  • 314
  • 5
  • 19