We deliver solutions for the AI eraâcombining symbolic computation, data-driven insights and deep technology expertise.
DiscreteUniformDistribution[{{imin,imax},{jmin,jmax},…}]
represents a multivariate discrete uniform distribution over integers within the box {{imin,imax},{jmin,jmax},…}.
Details Background & ContextProbability mass function of a univariate discrete uniform distribution:
Cumulative distribution function of a univariate discrete uniform distribution:
Mean and variance of a univariate discrete uniform distribution:
Median of a univariate discrete uniform distribution:
Probability density function of a bivariate discrete uniform distribution:
Cumulative distribution function of a bivariate discrete uniform distribution:
Mean and variance of a bivariate case:
Scope (11)Generate a sample of pseudorandom numbers from a discrete uniform distribution:
Compare its histogram to the PDF:
Distribution parameters estimation:
Estimate the distribution parameters from sample data:
Compare the density histogram of the sample with the PDF of the estimated distribution:
Distribution parameters estimation for a multivariate discrete uniform distribution:
Estimate the distribution parameters from sample data:
With an infinitely large interval, the kurtosis equals the kurtosis of UniformDistribution:
Multivariate discrete uniform distribution:
The components of discrete uniform distribution are uncorrelated:
Different moments with closed forms as functions of parameters:
Closed form for symbolic order:
Closed form for symbolic order:
Closed form for symbolic order:
Different mixed moments for a multivariate discrete uniform distribution:
Closed form for symbolic order:
Closed form for symbolic order:
Closed form for symbolic order:
Closed form for symbolic order:
Hazard function of univariate discrete uniform distribution:
The marginals of a multivariate discrete uniform distribution are discrete uniform distributions:
Applications (7)The CDF of DiscreteUniformDistribution is an example of a right-continuous function:
A computer has four disks, numbered 0, 1, 2, 3, one of which is chosen at random on boot to store temporary files. Find the distribution of the chosen disk:
Find the probability that disk 1 is chosen:
Find the probability that an odd-numbered disk is chosen:
Simulate which disk is chosen on the next 30 boots:
A fair six-sided die can be modeled using a DiscreteUniformDistribution:
Generate 10 throws of the die:
Compute the probability that the sum of three dice values is less than 6:
Verify by generating random dice throws, in this case times three dice throws:
Verify by explicitly enumerating all possible dice outcomes:
Two fair dice are tossed. Find the distribution of the difference of the dice values:
Find the probability that the difference is at most 3:
Simulate differences for the 30 tosses:
In the game of craps [MathWorld], two dice are thrown:
The resulting PDF can be tabulated as:
Find the probability of getting "snake eyes" [MathWorld]:
Or "boxcars" [MathWorld]:
Or "eighter from Decatur" [MathWorld]:
Or "little Joe" [MathWorld]:
The full list of probabilities:
Find the probability of losing in one throw or getting craps, i.e. any of the sums 2, 3, or 12:
Find the probability of winning in one throw, i.e. getting the sums 7 or 11:
A hypothetical R&D company has a holiday whenever at least one employee has a birthday. Find the number of employees that maximizes the days worked, assuming independent distributions of birthdays:
Find the optimal number of employees:
Solve Galileo's problem to determine the odds of getting 9 points versus 10 points obtained in throws of three dice:
Although the number of integer partitions of 10 and 9 into a sum of three numbers 1–6 are the same:
Odds of getting 10 points are higher:
Properties & Relations (3) Possible Issues (2)DiscreteUniformDistribution is not defined when min or max is not an integer:
Substitution of invalid parameters into symbolic outputs gives results that are not meaningful:
Neat Examples (1) Wolfram Research (2007), DiscreteUniformDistribution, Wolfram Language function, https://reference.wolfram.com/language/ref/DiscreteUniformDistribution.html (updated 2010). TextWolfram Research (2007), DiscreteUniformDistribution, Wolfram Language function, https://reference.wolfram.com/language/ref/DiscreteUniformDistribution.html (updated 2010).
CMSWolfram Language. 2007. "DiscreteUniformDistribution." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2010. https://reference.wolfram.com/language/ref/DiscreteUniformDistribution.html.
APAWolfram Language. (2007). DiscreteUniformDistribution. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/DiscreteUniformDistribution.html
BibTeX@misc{reference.wolfram_2025_discreteuniformdistribution, author="Wolfram Research", title="{DiscreteUniformDistribution}", year="2010", howpublished="\url{https://reference.wolfram.com/language/ref/DiscreteUniformDistribution.html}", note=[Accessed: 12-July-2025 ]}
BibLaTeX@online{reference.wolfram_2025_discreteuniformdistribution, organization={Wolfram Research}, title={DiscreteUniformDistribution}, year={2010}, url={https://reference.wolfram.com/language/ref/DiscreteUniformDistribution.html}, note=[Accessed: 12-July-2025 ]}
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4