# Interpreting Gaussian probabilities greater than 1 [duplicate]

Possible Duplicate:
Probability distribution value exceeding 1 is OK?

I'm a bit confused how I am getting probabilities greater than 1 when calculating p(x | mu, sigma) when x = mu. For example, if I run:

>> gaussProb(0, 0, 0.1)
ans =
1.2616


where gaussProb is a matlab function from the PMTK toolbox:

function p = gaussProb(X, mu, Sigma)
% Multivariate Gaussian distribution, pdf
% X(i,:) is i'th case
% *** In the univariate case, Sigma is the variance, not the standard
% deviation! ***

% This file is from pmtk3.googlecode.com

d = size(Sigma, 2);
X  = reshape(X, [], d);  % make sure X is n-by-d and not d-by-n
X = bsxfun(@minus, X, rowvec(mu));
logp = -0.5*sum((X/(Sigma)).*X, 2);
logZ = (d/2)*log(2*pi) + 0.5*logdet(Sigma);
logp = logp - logZ;
p = exp(logp);

end


Is this some fundamental property of the Gaussian distribution or an issue with numerical accuracy in the computation?

I've come across this issue by trying to weight samples from a Gaussian distribution obtained from a Gaussian process prediction, where I will get massive probabilities.

Thanks

## marked as duplicate by whuber♦Apr 11 '11 at 15:04

The code in the question returns the values of probability density function. The values of probability density function can be greater than one. The actual probability $P(X<x)$ for random variable $X$ with probability density function $p(x)$ is integral $\int_{-\infty}^xp(t)dt$. The values of this integral are of course restricted to interval $[0,1]$.
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.9184275269508362, "perplexity": 2354.5911381212504}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2019-39/segments/1568514573098.0/warc/CC-MAIN-20190917161045-20190917183045-00121.warc.gz"}