Function Reference: bisapdf

statistics: y = bisapdf (x, beta, gamma)

Birnbaum-Saunders probability density function (PDF).

For each element of x, compute the probability density function (PDF) of the Birnbaum-Saunders distribution with scale parameter beta and shape parameter gamma. The size of y is the common size of x, beta, and gamma. A scalar input functions as a constant matrix of the same size as the other inputs.

Further information about the Birnbaum-Saunders distribution can be found at https://en.wikipedia.org/wiki/Birnbaum%E2%80%93Saunders_distribution

See also: bisacdf, bisapdf, bisarnd, bisafit, bisalike, bisastat

Source Code: bisapdf

Example: 1

 

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

                    
plotted figure

Example: 2

 

 ## Plot various PDFs from the Birnbaum-Saunders distribution
 x = 0.01:0.01:6;
 y1 = bisapdf (x, 1, 0.3);
 y2 = bisapdf (x, 2, 0.3);
 y3 = bisapdf (x, 1, 0.5);
 y4 = bisapdf (x, 3, 0.5);
 y5 = bisapdf (x, 5, 0.5);
 plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", x, y4, "-c", x, y5, "-m")
 grid on
 ylim ([0, 1.5])
 legend ({"β = 1, γ = 0.3", "β = 2, γ = 0.3", "β = 1, γ = 0.5", ...
          "β = 3, γ = 0.5", "β = 5, γ = 0.5"}, "location", "northeast")
 title ("Birnbaum-Saunders CDF")
 xlabel ("values in x")
 ylabel ("density")

                    
plotted figure