---
layout: example
title: Probability Density Example
permalink: /examples/probability-density/index.html
spec: probability-density
image: /examples/img/probability-density.png
---

Visual comparison of estimated probability distributions for a sample of numeric values: a normal (Gaussian) distribution parameterized by the mean and standard deviation, and a [kernel density estimate](https://en.wikipedia.org/wiki/Kernel_density_estimation). This example supports estimates of either [probability density functions (pdf)](https://en.wikipedia.org/wiki/Probability_density_function) or [cumulative distribution functions (cdf)](https://en.wikipedia.org/wiki/Cumulative_distribution_function), using Vega's [density](../../docs/transforms/density) transform.

{% include example spec=page.spec %}
