Products
  • Wolfram|One

    The definitive Wolfram Language and notebook experience

  • Mathematica

    The original technical computing environment

  • Wolfram Notebook Assistant + LLM Kit

    All-in-one AI assistance for your Wolfram experience

  • System Modeler
  • Wolfram Player
  • Finance Platform
  • Wolfram Engine
  • Enterprise Private Cloud
  • Application Server
  • Wolfram|Alpha Notebook Edition
  • Wolfram Cloud App
  • Wolfram Player App

More mobile apps

Core Technologies of Wolfram Products

  • Wolfram Language
  • Computable Data
  • Wolfram Notebooks
  • AI & Linguistic Understanding

Deployment Options

  • Wolfram Cloud
  • wolframscript
  • Wolfram Engine Community Edition
  • Wolfram LLM API
  • WSTPServer
  • Wolfram|Alpha APIs

From the Community

  • Function Repository
  • Community Paclet Repository
  • Example Repository
  • Neural Net Repository
  • Prompt Repository
  • Wolfram Demonstrations
  • Data Repository
  • Group & Organizational Licensing
  • All Products
Consulting & Solutions

We deliver solutions for the AI era—combining symbolic computation, data-driven insights and deep technical expertise

  • Data & Computational Intelligence
  • Model-Based Design
  • Algorithm Development
  • Wolfram|Alpha for Business
  • Blockchain Technology
  • Education Technology
  • Quantum Computation

WolframConsulting.com

Wolfram Solutions

  • Data Science
  • Artificial Intelligence
  • Biosciences
  • Healthcare Intelligence
  • Sustainable Energy
  • Control Systems
  • Enterprise Wolfram|Alpha
  • Blockchain Labs

More Wolfram Solutions

Wolfram Solutions For Education

  • Research Universities
  • Colleges & Teaching Universities
  • Junior & Community Colleges
  • High Schools
  • Educational Technology
  • Computer-Based Math

More Solutions for Education

  • Contact Us
Learning & Support

Get Started

  • Wolfram Language Introduction
  • Fast Intro for Programmers
  • Fast Intro for Math Students
  • Wolfram Language Documentation

More Learning

  • Highlighted Core Areas
  • Demonstrations
  • YouTube
  • Daily Study Groups
  • Wolfram Schools and Programs
  • Books

Grow Your Skills

  • Wolfram U

    Courses in computing, science, life and more

  • Community

    Learn, solve problems and share ideas.

  • Blog

    News, views and insights from Wolfram

  • Resources for

    Software Developers

Tech Support

  • Contact Us
  • Support FAQs
  • Support FAQs
  • Contact Us
Company
  • About Wolfram
  • Career Center
  • All Sites & Resources
  • Connect & Follow
  • Contact Us

Work with Us

  • Student Ambassador Initiative
  • Wolfram for Startups
  • Student Opportunities
  • Jobs Using Wolfram Language

Educational Programs for Adults

  • Summer School
  • Winter School

Educational Programs for Youth

  • Middle School Camp
  • High School Research Program
  • Computational Adventures

Read

  • Stephen Wolfram's Writings
  • Wolfram Blog
  • Wolfram Tech | Books
  • Wolfram Media
  • Complex Systems

Educational Resources

  • Wolfram MathWorld
  • Wolfram in STEM/STEAM
  • Wolfram Challenges
  • Wolfram Problem Generator

Wolfram Initiatives

  • Wolfram Science
  • Wolfram Foundation
  • History of Mathematics Project

Events

  • Stephen Wolfram Livestreams
  • Online & In-Person Events
  • Contact Us
  • Connect & Follow
Wolfram|Alpha
  • Your Account
  • User Portal
  • Wolfram Cloud
  • Products
    • Wolfram|One
    • Mathematica
    • Wolfram Notebook Assistant + LLM Kit
    • System Modeler
    • Wolfram Player
    • Finance Platform
    • Wolfram|Alpha Notebook Edition
    • Wolfram Engine
    • Enterprise Private Cloud
    • Application Server
    • Wolfram Cloud App
    • Wolfram Player App

    More mobile apps

    • Core Technologies
      • Wolfram Language
      • Computable Data
      • Wolfram Notebooks
      • AI & Linguistic Understanding
    • Deployment Options
      • Wolfram Cloud
      • wolframscript
      • Wolfram Engine Community Edition
      • Wolfram LLM API
      • WSTPServer
      • Wolfram|Alpha APIs
    • From the Community
      • Function Repository
      • Community Paclet Repository
      • Example Repository
      • Neural Net Repository
      • Prompt Repository
      • Wolfram Demonstrations
      • Data Repository
    • Group & Organizational Licensing
    • All Products
  • Consulting & Solutions

    We deliver solutions for the AI era—combining symbolic computation, data-driven insights and deep technical expertise

    WolframConsulting.com

    Wolfram Solutions

    • Data Science
    • Artificial Intelligence
    • Biosciences
    • Healthcare Intelligence
    • Sustainable Energy
    • Control Systems
    • Enterprise Wolfram|Alpha
    • Blockchain Labs

    More Wolfram Solutions

    Wolfram Solutions For Education

    • Research Universities
    • Colleges & Teaching Universities
    • Junior & Community Colleges
    • High Schools
    • Educational Technology
    • Computer-Based Math

    More Solutions for Education

    • Contact Us
  • Learning & Support

    Get Started

    • Wolfram Language Introduction
    • Fast Intro for Programmers
    • Fast Intro for Math Students
    • Wolfram Language Documentation

    Grow Your Skills

    • Wolfram U

      Courses in computing, science, life and more

    • Community

      Learn, solve problems and share ideas.

    • Blog

      News, views and insights from Wolfram

    • Resources for

      Software Developers
    • Tech Support
      • Contact Us
      • Support FAQs
    • More Learning
      • Highlighted Core Areas
      • Demonstrations
      • YouTube
      • Daily Study Groups
      • Wolfram Schools and Programs
      • Books
    • Support FAQs
    • Contact Us
  • Company
    • About Wolfram
    • Career Center
    • All Sites & Resources
    • Connect & Follow
    • Contact Us

    Work with Us

    • Student Ambassador Initiative
    • Wolfram for Startups
    • Student Opportunities
    • Jobs Using Wolfram Language

    Educational Programs for Adults

    • Summer School
    • Winter School

    Educational Programs for Youth

    • Middle School Camp
    • High School Research Program
    • Computational Adventures

    Read

    • Stephen Wolfram's Writings
    • Wolfram Blog
    • Wolfram Tech | Books
    • Wolfram Media
    • Complex Systems
    • Educational Resources
      • Wolfram MathWorld
      • Wolfram in STEM/STEAM
      • Wolfram Challenges
      • Wolfram Problem Generator
    • Wolfram Initiatives
      • Wolfram Science
      • Wolfram Foundation
      • History of Mathematics Project
    • Events
      • Stephen Wolfram Livestreams
      • Online & In-Person Events
    • Contact Us
    • Connect & Follow
  • Wolfram|Alpha
  • Wolfram Cloud
  • Your Account
  • User Portal
Wolfram Language & System Documentation Center
EmpiricalDistribution
  • See Also
    • SurvivalDistribution
    • HistogramDistribution
    • SmoothKernelDistribution
    • KernelMixtureDistribution
    • ProbabilityDistribution
    • EstimatedDistribution
    • FindDistribution
  • Related Guides
    • Probability & Statistics with Quantities
    • Nonparametric Statistical Distributions
    • Time Series Processing
    • Statistical Data Analysis
    • Random Variables
    • Survival Analysis
    • See Also
      • SurvivalDistribution
      • HistogramDistribution
      • SmoothKernelDistribution
      • KernelMixtureDistribution
      • ProbabilityDistribution
      • EstimatedDistribution
      • FindDistribution
    • Related Guides
      • Probability & Statistics with Quantities
      • Nonparametric Statistical Distributions
      • Time Series Processing
      • Statistical Data Analysis
      • Random Variables
      • Survival Analysis

EmpiricalDistribution[{x1,x2,…}]

represents an empirical distribution based on the data values xi.

EmpiricalDistribution[{{x1,y1,…},{x2,y2,…},…}]

represents a multivariate empirical distribution based on the data values {xi,yi,…}.

EmpiricalDistribution[{w1,w2,…}{d1,d2,…}]

represents an empirical distribution where data values di occur with weights wi.

Details
Details and Options Details and Options
Examples  
Basic Examples  
Scope  
Basic Uses  
Distribution Properties  
Applications  
Properties & Relations  
See Also
Related Guides
History
Cite this Page
BUILT-IN SYMBOL
  • See Also
    • SurvivalDistribution
    • HistogramDistribution
    • SmoothKernelDistribution
    • KernelMixtureDistribution
    • ProbabilityDistribution
    • EstimatedDistribution
    • FindDistribution
  • Related Guides
    • Probability & Statistics with Quantities
    • Nonparametric Statistical Distributions
    • Time Series Processing
    • Statistical Data Analysis
    • Random Variables
    • Survival Analysis
    • See Also
      • SurvivalDistribution
      • HistogramDistribution
      • SmoothKernelDistribution
      • KernelMixtureDistribution
      • ProbabilityDistribution
      • EstimatedDistribution
      • FindDistribution
    • Related Guides
      • Probability & Statistics with Quantities
      • Nonparametric Statistical Distributions
      • Time Series Processing
      • Statistical Data Analysis
      • Random Variables
      • Survival Analysis

EmpiricalDistribution

EmpiricalDistribution[{x1,x2,…}]

represents an empirical distribution based on the data values xi.

EmpiricalDistribution[{{x1,y1,…},{x2,y2,…},…}]

represents a multivariate empirical distribution based on the data values {xi,yi,…}.

EmpiricalDistribution[{w1,w2,…}{d1,d2,…}]

represents an empirical distribution where data values di occur with weights wi.

Details

  • EmpiricalDistribution returns a DataDistribution object that can be used like any other probability distribution.
  • The cumulative distribution function for EmpiricalDistribution for a value x is given by 1/nsum_iBoole[x_i<=x].
  • EmpiricalDistribution can be used with such functions as Mean, CDF, and RandomVariate.

Examples

open all close all

Basic Examples  (2)

Create an empirical distribution of univariate data:

Visualize distribution functions:

Compute moments and quantiles:

Create an empirical distribution of bivariate data:

Visualize the estimated CDF:

Compute covariance and general moments:

Scope  (19)

Basic Uses  (10)

Create an empirical distribution of univariate data:

Larger datasets lead to better approximations of the underlying distribution:

Construct empirical distribution for quantity data:

Calculate select descriptive statistics:

Use exact numeric data:

Specify a list of weights corresponding to each data value:

Use symbolic weights:

A general moment of the distribution:

The CDF evaluated at 4:

Create an empirical distribution of bivariate data:

Larger datasets produce smoother estimates:

Specify a list of weights for bivariate data:

Create an empirical distribution of data in higher dimensions:

Plot the univariate marginal CDFs:

Plot the bivariate marginal CDFs:

EmpiricalDistribution works with the values only when the input is a TimeSeries:

Compare to using the values only:

EmpiricalDistribution works with all the values together when the input is a TemporalData:

The same as:

Distribution Properties  (9)

Obtain empirical estimates of distribution functions:

PDF and HazardFunction are discrete:

CDF and SurvivalFunction are piecewise constant:

Compute moments:

Special moments:

General moments:

Estimate the quantile function:

Special quantile values:

Generate a set of random numbers:

Compare the histogram to the PDF of the underlying density:

Compute probabilities and expectations:

Generating functions:

Estimate bivariate distribution functions:

CDF and SurvivalFunction are piecewise constant:

Compute bivariate moments:

Special moments:

General moments:

Generate a set of random numbers:

Applications  (8)

Compare the distribution of data to a theoretical distribution:

Compare multivariate data to a theoretical distribution:

The difference:

Produce a smoothed representation with SmoothKernelDistribution:

Using HistogramDistribution with bin delimiters set to the data creates a linear interpolation of EmpiricalDistribution:

Ten letters published in 1861 under the name Quintus Curtius Snodgrass are claimed to have been authored by Mark Twain. Compare the word length distribution for the letters to some works by Mark Twain:

Comparison to the English language in general emphasizes the similarity:

A test for goodness of fit suggests, however, that Twain did not write the QCS letters:

Compare the distributions of winning times in Scottish hill races for those who take the high road and those who take the low road:

Plot record times vs. elevation gain:

Find the median elevation gain:

Split races at the median elevation gain to the high and low roads:

It appears that it is faster to take the low road:

The record times of high road races vary more than those of low road races:

The National Institutes of Health estimates that 2% of the population has a certain disease. A test for the disease is proposed that detects its presence 95% of the time with a false positive rate of 5%. Given that a patient tests positive, find the probability that he or she actually has the disease:

Equations for the unknown probabilities based on the information given:

Solve the equations, assuming the probabilities sum to unity:

The probability a patient has the disease given a positive test result:

A group of 21 students was selected at random to participate in a new directed reading program. A control group of 23 students was educated with traditional methods. Reading test scores for students in the two groups were recorded following their programs. Perform a permutation-based test on the scores to determine if the directed reading program was successful:

The mean difference in test scores across the groups can be used as a test statistic:

Simulate the null distribution of the test statistic by randomly permuting the groups:

At the 5% level, there is evidence that the new program made a difference:

LocationTest could have been used to test the hypothesis directly:

Properties & Relations  (8)

Random number generation from an empirical distribution returns a bootstrapped sample:

EmpiricalDistribution is a consistent estimator of the underlying distribution:

Moments and their equivalence to those of the data:

The population rather than the sample variance is used for empirical distributions:

Quantiles are equivalent to Quantile applied directly to the data:

EmpiricalDistribution is equivalent to SurvivalDistribution with no censoring:

Use the union of data values as bin delimiters for HistogramDistribution:

The resulting PDF is a zero-order interpolation of the PDF for EmpiricalDistribution:

Applying N to exact data can reduce memory consumption:

The CDFs are equivalent:

EmpiricalDistribution on integers can be specified using ProbabilityDistribution:

See Also

SurvivalDistribution  HistogramDistribution  SmoothKernelDistribution  KernelMixtureDistribution  ProbabilityDistribution  EstimatedDistribution  FindDistribution

Related Guides

    ▪
  • Probability & Statistics with Quantities
  • ▪
  • Nonparametric Statistical Distributions
  • ▪
  • Time Series Processing
  • ▪
  • Statistical Data Analysis
  • ▪
  • Random Variables
  • ▪
  • Survival Analysis

History

Introduced in 2010 (8.0) | Updated in 2016 (10.4)

Wolfram Research (2010), EmpiricalDistribution, Wolfram Language function, https://reference.wolfram.com/language/ref/EmpiricalDistribution.html (updated 2016).

Text

Wolfram Research (2010), EmpiricalDistribution, Wolfram Language function, https://reference.wolfram.com/language/ref/EmpiricalDistribution.html (updated 2016).

CMS

Wolfram Language. 2010. "EmpiricalDistribution." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2016. https://reference.wolfram.com/language/ref/EmpiricalDistribution.html.

APA

Wolfram Language. (2010). EmpiricalDistribution. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/EmpiricalDistribution.html

BibTeX

@misc{reference.wolfram_2025_empiricaldistribution, author="Wolfram Research", title="{EmpiricalDistribution}", year="2016", howpublished="\url{https://reference.wolfram.com/language/ref/EmpiricalDistribution.html}", note=[Accessed: 01-December-2025]}

BibLaTeX

@online{reference.wolfram_2025_empiricaldistribution, organization={Wolfram Research}, title={EmpiricalDistribution}, year={2016}, url={https://reference.wolfram.com/language/ref/EmpiricalDistribution.html}, note=[Accessed: 01-December-2025]}

Top
Introduction for Programmers
Introductory Book
Wolfram Function Repository | Wolfram Data Repository | Wolfram Data Drop | Wolfram Language Products
Top
  • Products
  • Wolfram|One
  • Mathematica
  • Notebook Assistant + LLM Kit
  • System Modeler

  • Wolfram|Alpha Notebook Edition
  • Wolfram|Alpha Pro
  • Mobile Apps

  • Wolfram Player
  • Wolfram Engine

  • Volume & Site Licensing
  • Server Deployment Options
  • Consulting
  • Wolfram Consulting
  • Repositories
  • Data Repository
  • Function Repository
  • Community Paclet Repository
  • Neural Net Repository
  • Prompt Repository

  • Wolfram Language Example Repository
  • Notebook Archive
  • Wolfram GitHub
  • Learning
  • Wolfram U
  • Wolfram Language Documentation
  • Webinars & Training
  • Educational Programs

  • Wolfram Language Introduction
  • Fast Introduction for Programmers
  • Fast Introduction for Math Students
  • Books

  • Wolfram Community
  • Wolfram Blog
  • Public Resources
  • Wolfram|Alpha
  • Wolfram Problem Generator
  • Wolfram Challenges

  • Computer-Based Math
  • Computational Thinking
  • Computational Adventures

  • Demonstrations Project
  • Wolfram Data Drop
  • MathWorld
  • Wolfram Science
  • Wolfram Media Publishing
  • Customer Resources
  • Store
  • Product Downloads
  • User Portal
  • Your Account
  • Organization Access

  • Support FAQ
  • Contact Support
  • Company
  • About Wolfram
  • Careers
  • Contact
  • Events
Wolfram Community Wolfram Blog
Legal & Privacy Policy
WolframAlpha.com | WolframCloud.com
© 2025 Wolfram
© 2025 Wolfram | Legal & Privacy Policy |
English