Categories &

Functions List

Function Reference: fpdf

statistics: y = fpdf (x, df1, df2)

F-probability density function (PDF).

For each element of x, compute the probability density function (PDF) of the F-distribution with df1 and df2 degrees of freedom. The size of y is the common size of x, df1, and df2. A scalar input functions as a constant matrix of the same size as the other inputs.

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

See also: fcdf, finv, frnd, fstat

Source Code: fpdf

Example: 1

 

 ## Plot various PDFs from the F distribution
 x = 0.01:0.01:4;
 y1 = fpdf (x, 1, 1);
 y2 = fpdf (x, 2, 1);
 y3 = fpdf (x, 5, 2);
 y4 = fpdf (x, 10, 1);
 y5 = fpdf (x, 100, 100);
 plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c", x, y5, "-m")
 grid on
 ylim ([0, 2.5])
 legend ({"df1 = 1, df2 = 2", "df1 = 2, df2 = 1", ...
          "df1 = 5, df2 = 2", "df1 = 10, df2 = 1", ...
          "df1 = 100, df2 = 100"}, "location", "northeast")
 title ("F PDF")
 xlabel ("values in x")
 ylabel ("density")

                    
plotted figure