Evaluates the normal probability density function.

You're viewing an older version of this page (#206). View the current version.

View versions (2)

Interface

#include <codecogs/statistics/distributions/continuous/normal/pdf.h>

using namespace Statistics::Distributions::Continuous::Normal;

This function evaluates the normal probability density function.

1/normpdf-1.gif

Example 1

#include <iostream>
#include <codecogs/stats/dists/continuous/normal/pdf.h>

int main()
{
  std::cout << "normal PDF (2.31, 2, 5) = ";
  std::cout << Stats::Dists::Continuous::Normal::PDF(2.31, 2, 5) << std::endl;
  return 0;
}

Output:

normal PDF (2.31, 2, 5) = 0.0796352

Parameters

x
the value at which to evaluate the function
m
the mean of the distribution
s
the standard deviation of the distribution
GPL Licence — free for non commercial use. See Licence details.

Interactive Calculator

x
m
s
Result