# How to compute summary statistics and quantiles of user defined discrete distribution? [closed]

I am interested to find out the mean, median, Variance, Skewness, Kurtosis and Quantiles of the following discrete distribution with pmf (E^((1 - E^[Nu]) n) [Nu]^x BellB[n, x])/x! with x=0,1,2...... please guide me how I compute these measures using methematica? share mathematica code. Reg; Amin

• dist = ProbabilityDistribution[(E^((1 - E^Nu) n) Nu^x BellB[n, x])/x!, {x, 0, Infinity, 1}]; then Mean[dist], Variance[dist] ... etc. However these won't work unless you provide a value for Nu and n. If Nu=1 and n=1, then Sum[(E^((1 - E^Nu) n) Nu^x BellB[n, x])/x!, {x, 0, \[Infinity]}] is E^(2 - E), so there's some normalization in n and Nu required. – flinty Jul 18 at 17:32
• You can get a symbolic result by setting a positive integer value for n and use dist = ProbabilityDistribution[(E^((1 - E^Nu) n) Nu^x BellB[n, x])/x! /. n -> 5, {x, 0, Infinity, 1}, Method -> "Normalize"]; Mean[dist]//FullSimplify (as an example for n = 5. By trying different values of n you might see a general formula for any positive integer value of n. – JimB Jul 18 at 21:49
• Dear JimB thanks for response. Actually I want to compute these measures in symbolic form i.e. with n and Nu – Muhammad Amin Jul 19 at 5:43
• What makes you think there is a compact symbolic form for even the mean? – JimB Jul 19 at 6:04
• Yes in compact symbolic form especially for Mean, Variance, and Quantile – Muhammad Amin Jul 19 at 6:10

\$Version

(* "12.1.1 for Mac OS X x86 (64-bit) (June 19, 2020)" *)

Clear["Global*"]

dist = ProbabilityDistribution[(E^((1 - E^Nu) n) Nu^x BellB[n, x])/x!, {x, 0,
Infinity, 1},
Assumptions -> {Element[n, Integers], n >= 0},
Method -> "Normalize"];


Verifying that the distribution is valid for some typical values of n

And @@ Table[
Sum[PDF[dist, x], {x, 0, Infinity}] == 1, {n, 0, 5}]

(* True *)


For a specific value of n

n = 3;

Join[
{{Style[StringForm["n = ", n], 14, Bold], SpanFromLeft}},
{#, #[dist]} & /@ {Mean, Variance, Skewness, Kurtosis}] //
Grid[#, Frame -> All] &
`

The median and other quartiles cannot be found symbolically.

• Dear Bob thanks for your response – Muhammad Amin Sep 2 at 18:08