unipdf(3f) - [M_datapac:PROBABILITY_DENSITY] trivially compute the Uniform probability density function
Synopsis
Description
Input Arguments
Output Arguments
Examples
Author
Maintainer
License
References
SUBROUTINE UNIPDF(X,Pdf)
REAL(kind=wp),intent(in) :: X REAL(kind=wp),intent(out) :: Pdf
UNIPDF(3f) computes the probability density function value for the uniform (rectangular) distribution on the unit interval (0,1).This distribution has mean = 0.5 and standard deviation = sqrt(1/12) = 0.28867513. this distribution has the probability density function
f(X) = 1That is, trivially no matter what the input the output is 1.
X The REAL value at which the probability density function is to be evaluated. X should be between 0 and 1, inclusively.
The REAL probability density function value.
Sample program:
program demo_unipdf !@(#) line plotter graph of probability density function use M_datapac, only : unipdf, label implicit none real,allocatable :: x(:), y(:) integer :: i call label(unipdf) x=[(real(i)/10.0,i=0,10,1)] if(allocated(y))deallocate(y) allocate(y(size(x))) do i=1,size(x) call unipdf( x(i), y(i) ) enddo write(*,*)y end program demo_unipdfResults:
1.00 1.000000 1.000000 1.000000 1.000000 1.00 1.000000 1.000000 1.000000 1.000000 1.00
The original DATAPAC library was written by James Filliben of the Statistical Engineering Division, National Institute of Standards and Technology.
John Urban, 2022.05.31
CC0-1.0
o Johnson and Kotz, Continuous Univariate Distributions--2, 1970, pages 57-74.
Nemo Release 3.1 | unipdf (3) | February 23, 2025 |