Calculator inputs
Choose a calculation mode and enter the required values.
Formula used
f(x) = 1 / (σ√(2π)) × exp(−(x−μ)² / (2σ²))
z = (x−μ) / σ
log f(x) = −log(σ√(2π)) − (x−μ)² / (2σ²)
The density measures local plausibility, not direct probability. Interval probabilities use areas under the curve. Log-density prevents underflow in larger machine learning models.
How to use
- Select the calculation mode matching your modelling task.
- Enter the Gaussian mean and spread parameter.
- Add values, bounds, probabilities, or dataset observations.
- Choose precision, notation, and optional estimation settings.
- Submit the form and review every generated result.
- Export the table using CSV, PDF, or copying.
Example data
| Example | Mean | Standard deviation | Input | Suggested mode |
|---|---|---|---|---|
| Standard normal density | 0 | 1 | x = 1.5 | Density at one value |
| Central probability | 100 | 15 | 85 to 115 | Probability between bounds |
| Feature anomaly scan | 0 | 1 | −0.2, 0.4, 3.8 | Anomaly detection |
Machine learning applications
Gaussian densities support probabilistic classification and continuous feature modelling. Log-likelihoods improve stability during optimisation and model comparison. Tail probabilities also help identify unusual observations and anomalies.
Gaussian Naive Bayes multiplies class-conditional feature likelihoods together. Logarithms convert those products into safer numerical sums. Parameter estimation can derive model means and variances directly.
Frequently asked questions
Is probability density the same as probability?
No, density measures concentration around a specific value. Probability requires an interval under the density curve. A single exact continuous value has zero probability.
Why must standard deviation exceed zero?
Zero spread collapses the Gaussian distribution completely. The density formula would divide by zero. Positive spread keeps every calculation mathematically defined and stable.
What does a negative log-density mean?
Densities below one produce negative natural logarithms. This result is normal for many Gaussian settings. Negative log-likelihood reverses the sign for optimisation objectives.
How does anomaly detection work here?
The calculator compares every observation against your selected threshold. Low densities or tail probabilities indicate unusual observations. Threshold quality still depends on representative training data.
When should parameters be estimated?
Estimate parameters when observations represent your target distribution. Use fixed parameters when a trained model already supplies them. Always check whether the Gaussian assumption remains reasonable.
What is the sample variance correction?
Sample variance divides squared deviations by n minus one. Population variance instead divides those deviations by n. The correction reduces bias for sampled population estimates.
Why use log-scores in Naive Bayes?
Many small likelihoods can underflow during multiplication. Logarithms change products into manageable addition operations. Class comparisons remain equivalent after this mathematical transformation.
What does the relative peak density show?
It compares density at x with maximum density. The maximum occurs exactly at the distribution mean. Smaller percentages indicate observations farther from that centre.
Can the calculator handle many values?
Yes, batch mode accepts separated numeric observations. It returns density, probability, z-score, and anomaly information. Very large datasets may require dedicated statistical software.