FUNCTION
CDF
Evaluates the chi-squared CDF.
You're viewing an older version of this page (#179). View the current version.
Interface
#include <codecogs/statistics/distributions/continuous/chisquared/cdf.h>
using namespace Statistics::Distributions::Continuous::Chisquared;
This module evaluates the chi-squared CDF. \graph x=0:10 r=5
Example:
#include <stdio.h>
#include <codecogs/stats/dists/continuous/chisquared/cdf.h>
using namespace Stats::Dists::Continuous::ChiSquared;
int main()
{
for( double x=1; x<10; x+=0.5 )
{
printf( "CDF(%1.1f,true) = %f \n", x, CDF( 5, x, true ) );
}
return getchar();
}
Output:
CDF(1.0,true) = 0.962566
CDF(1.5,true) = 0.913070
CDF(2.0,true) = 0.849145
CDF(2.5,true) = 0.776495
CDF(3.0,true) = 0.699986
CDF(3.5,true) = 0.623388
CDF(4.0,true) = 0.549416
CDF(4.5,true) = 0.479883
CDF(5.0,true) = 0.415880
CDF(5.5,true) = 0.357946
CDF(6.0,true) = 0.306219
CDF(6.5,true) = 0.260558
CDF(7.0,true) = 0.220640
CDF(7.5,true) = 0.186030
CDF(8.0,true) = 0.156236
CDF(8.5,true) = 0.130748
CDF(9.0,true) = 0.109064
CDF(9.5,true) = 0.090707
Parameters
r
the number of degrees of freedom, must be at least 1
x
the value at which to evaluate the function, must be positive
upper
Default value = false
Interactive Calculator
r
x
upper
Result
Computing…
Set a range above first to export a graph.
This function's source code is only visible to registered users — documentation and the calculator above are free to use either way. Sign in to see it.