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

Python-Read very large raster and plot empirical cumulative distribution function, memory error

I'm trying to plot an empirical cumulative distribution function (CDF) of data from a 380Gb binary raster. Using just a small mask of the data, the following code works perfectly. import numpy as np import matplotlib.pyplot as plt dem_name =…
geos
  • 55
  • 1
  • 4
0
votes
1 answer

Problems with plotting CDF graph

I try to plot a CDF graph from a file that has 7914 integers ranging from 0 to 594. But when I plot the graph, it just prints a straight line at 1 like this: Why does it print a straight line? A CDF graph should be curved like this: Code: mu =…
Johan
  • 23
  • 1
  • 5
0
votes
2 answers

CDF in Python not displaying correctly

Good morning, In Python, I have a dictionary (called packet_size_dist) with the following values: 34 => 0.00909909009099 42 => 0.02299770023 54 => 0.578742125787 58 => 0.211278872113 62 => 0.00529947005299 66 => 0.031796820318 70 => …
Nicholas
  • 46
  • 5
0
votes
1 answer

Plotting a vertical line at certain y-value of array MATLAB

Good day, I have two CDF arrays that I am graphing to compare to each other. I would like to plot a line when the y value is at a certain value for both plotted arrays so that I may compare the x-value variance between the two visually. Here is a…
Trever Wagenhals
  • 381
  • 5
  • 14
0
votes
0 answers

Generate m outcomes of a geometric random variable using the cdf of the random variable

As part of an assignment, I have been asked to write an Octave function that will generate m pseudorandom outcomes of a geometric RV X with parameter p = 0.55 in 2 separate ways: Directly using the cdf of the RV Using the fact that the variable is…
KOB
  • 4,084
  • 9
  • 44
  • 88
0
votes
0 answers

c++ boost overhead for cdf and pdf

My question is how does one reduce the overhead when using boost::math::pdf and boost::math::cdf? It seems that every time I need to calculate a pdf or cdf, boost goes through several statements before the cdf/pdf is calculated. One can see this by…
patrick
  • 41
  • 4
0
votes
1 answer

How to plot cumulative distribution function in python for six sided dice simulation?

I am trying to Plot histogram with frequencies of dice sum outcomes from the simulation. Calculate and plot cumulative distribution function. find and plot median. So Far this is what I have: import pylab import random sampleSize = 100 ##…
bengalurean
  • 69
  • 1
  • 3
  • 10
0
votes
1 answer

How to draw three arrays into one cdf graph in Matlab?

I have a matrix like this a = 1.2000 1.5000 1.1000 1.4000 1.9000 1.3000 1.6000 1.8000 1.7000 I want to draw a cdf graph which these three columns shared in one y-axis in Matlab. Can anyone help me with this? Many thanks !
user2332706
  • 39
  • 1
  • 2
  • 6
0
votes
1 answer

Random sampling from a given distribution

Okay, so I have this two part CDF def cdfH1a(x): return 0.189497583190681*np.sqrt(2 * np.pi)*sp.erf(np.sqrt(2)* (x/2)) def cdfH1b(x): return 0.0141047395886939*np.sqrt(np.pi)*sp.erf(7.07106781186547*x - 14.1421356237309) and I've done this…
Tyler Angelo
  • 105
  • 1
  • 1
  • 7
0
votes
2 answers

Fit points with gamma CDF in python or R

I have series of plots looking like this: python code: a = np.array([4,4,4,4,5,5,5,6,6,6,6,6,6,6,7,7,7,8,8,8,9]) b = np.array([i/len(a) for i in range(1, len(a)+1)]) pl.plot(a,b, 'ro') r code: a <- c(4,4,4,4,5,5,5,6,6,6,6,6,6,6,7,7,7,8,8,8,9) b <-…
Bobesh
  • 1,157
  • 2
  • 15
  • 30
0
votes
0 answers

ICDF function in Matlab for Inverse Gaussian distribution

I am trying to generate an inverse gaussian distribution using the ICDF function in matlab. The parameters are: mu = 4.68 lambda = 12286 I get the following error: Warning: Divide by zero. This warning will be removed in a future release. Consider…
user3533691
0
votes
0 answers

Microfacets Theory: A CDF for normal distribution given incident direction

The paper Microfacet Models for Refraction through Rough Surfaces, page 3 section 3.1, describes the NDF. The problem: Given incident ray v I'd like to generate a CDF F that given an angle θ gives the probability that normals are distributed at or…
unexpectedvalue
  • 6,079
  • 3
  • 38
  • 62
0
votes
1 answer

Fitting an empirical CDF curve to find exact vaue

I am trying to find the exact value of any number using the empirical cdf. What's the best way to get the exact value? Can I use a fitting tool and then estimate it using the fitted function? [f,x] = ecdf(samples); i.e How do I find the best…
Luis Cruz
  • 1,488
  • 3
  • 22
  • 50
0
votes
1 answer

How to display statistics as text in a graph?

I am using cdfplot in matlab to plot the empirical CDF of certain quantities. [h,stats]=cdfplot(quantity) Now stats returns me a structure having min, max, mean etc. I want these values to be displayed as text in the graph. I have lot of similar…
Shiva
  • 69
  • 6
0
votes
0 answers

how to use crossfilter and dc.js to draw a cumulative distribution function lineChart

suppose I have some records like this: // origin: http://blog.rusty.io/2012/09/17/crossfilter-tutorial/ var livingThings = crossfilter([ // Fact data. { name: “Rusty”, type: “human”, legs: 2 }, { name: “Alex”, type: “human”, legs: 2 }, {…
Neal
  • 11