Categories &

Functions List

Function Reference: betacdf

statistics: p = betacdf (x, a, b)
statistics: p = betacdf (x, a, b, 'upper')

Beta cumulative distribution function (CDF).

For each element of x, compute the cumulative distribution function of the Beta distribution with shape parameters a and b. The size of p is the common size of x, a, and b. A scalar input functions as a constant matrix of the same size as the other inputs.

p = betacdf (x, a, b, "upper") computes the upper tail probability of the Beta distribution with parameters a and b, at the values in x.

Further information about the Beta distribution can be found at https://en.wikipedia.org/wiki/Beta_distribution

See also: betainv, betapdf, betarnd, betafit, betalike, betastat

Source Code: betacdf

Example: 1

Plot various CDFs from the Beta distribution

 x = 0:0.005:1;
 p1 = betacdf (x, 0.5, 0.5);
 p2 = betacdf (x, 5, 1);
 p3 = betacdf (x, 1, 3);
 p4 = betacdf (x, 2, 2);
 p5 = betacdf (x, 2, 5);
 plot (x, p1, '-b', x, p2, '-g', x, p3, '-r', x, p4, '-c', x, p5, '-m')
 grid on
 legend ({'α = β = 0.5', 'α = 5, β = 1', 'α = 1, β = 3', ...
          'α = 2, β = 2', 'α = 2, β = 5'}, 'location', 'northwest')
 title ('Beta CDF')
 xlabel ('values in x')
 ylabel ('probability')
plotted figure