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
-1
votes
2 answers

CDF is not starting from zero

I have a data without any infinite value like below: data<-c(6.87, 0.11, 0, 0.03, 0.08, 0, 0.01, 0, 0, 0.13, 0.17, 0, 0.53, 0.01, 2.69, 0, 0, 0, 0, 0, 0, 5.44, 4.71, 3.57, 0.38, 0.31, 0.45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.02, 0.09, 0.43, 0, 0.23,…
-1
votes
1 answer

How to make a CDF in Python?

I made the PDF which is this hist code below; plt.figure() values1,bins1,_ = plt.hist(np.log10(fakeclusterlum),bins=20) plt.hist(np.log10(bigclusterlum151mh),alpha = .5,bins = bins1) but I am not sure how to plot this to make it into a CDF? I…
-1
votes
2 answers

Separating strings from numerical data in a .txt file by python

I have a .txt file that looks like this: 08/19/93 UW ARCHIVE 100.0 1962 W IEEE 14 Bus Test Case BUS DATA FOLLOWS 14 ITEMS 1 Bus 1 HV 1 1 3 1.060 0.0 0.0 0.0 232.4 -16.9 0.0 1.060…
gaurav
  • 21
  • 1
  • 5
-1
votes
4 answers

Binomial distribution CDF using scipy.stats.binom.cdf

I wrote below code to use binomial distribution CDF (by using scipy.stats.binom.cdf) to estimate the probability of having NO MORE THAN k heads out of 100 tosses, where k = 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100. and then I tried to plot it…
Hashmatullah Noorzai
  • 771
  • 3
  • 12
  • 34
-1
votes
1 answer

Cumulative Density Function of a normal distribution calculation without installing a Math module

I would like to calculate the Cumulative Density Function of a normal distribution in Perl. I am using the Math::Gauss module from CPAN which calculates a CDF without any problem. ttt.pl #!/usr/bin/perl use strict; use warnings; use Math::Gauss…
Jaeyoung Park
  • 339
  • 1
  • 6
-1
votes
1 answer

cumulative distribution function, threshold, R

I have daily values of runoff over a period of one month and one specific threshold. How can I find out on how many days the probability is more than 50% that the runoff exceeds that threshold? Am I right to use the CDF here? But how can I integrate…
N_ni
  • 27
  • 4
-1
votes
1 answer

implement empirical cdf c++

I want to define empirical cdf in C++ according to intervals fixed by N samples received and I should save the 2 vectors (T and Y)! I made this code but it didn't work: double cum_dist_funct::real_cdf_function(vec X,double x,int N,int Ndft,vec &T,…
-2
votes
1 answer

How do I produce the CDF of trajectory's segments per user in this case?

I have a dataframe containing users' trajectories and segments. A segment of a trajectory is considered part of the trajectories between 2-stops. So my df looks like this: df = pd.DataFrame( { 'trajectory': [1,1,1,2,2,2,3,3,3,4], …
planar
  • 13
  • 4
-2
votes
1 answer

Sanity check my JavaScript Factorial function for Google Sheets?

I need to calculate factorials for a bigger function in my spreadsheet (cdf for hypergeometric probabilities). I've tried lots of the ways that have been described in different posts here but none of them give me the correct result. If I plug in (3)…
bulkhed
  • 21
  • 2
-2
votes
1 answer

How to replace numerical values from a csv with categorical values using python

My question is about replacing a numerical value to string in csv file using python.The purpose is to calculate CDF(Cumulative Distribution Function). Name of the data set is 'hsb', the class label is 'status' which has 304 rows of numerical data 1s…
Eric
  • 31
  • 5
-2
votes
2 answers

Python: building a CCDF out of a list

I have the following list, where the 1st element is a generic value and the second is the number of occurrences of that value: mylist=[(2, 45), (3, 21), (4, 12), (5, 7), (6, 2), (7, 2), (8, 3), (9, 2), (10, 1), (11, 1), (15, 1), (17, 2), (18,…
FaCoffee
  • 7,609
  • 28
  • 99
  • 174
1 2 3
22
23