The Theoretical Operator

The theoretical operator can be used to calculate the actual result of a summary function applied to population with a particular distribution or the expected value of a summary function applied to a sample from that distribution.   The probability distribution is the left operand and can be described by a probability function with a set of parameters as the left argument, or with two-column matrix representing a relative frequency distribution.

The syntax of the criticalValue operator is:

          [Parameters]  distributionFunction|relativeFrequency theoretical summaryFunction 0|Value

The parameters are optional for the normal and rectangular distributions, defaulting to 0 1.  Some examples follow:

What is the expected number of heads if a fair coin is tossed ten times?

   10 0.5 binomial theoretical mean 0
5

        What is the standard deviation?

   10 0.5 binomial theoretical sdev 0
1.5811

        What is the expected number of spades in a bridge hand? .

   13 13 52 hyperGeometric theoretical mean 0
3.25

      What is the interquartile range?

   13 13 52 hyperGeometric theoretical iqr 0
2

   What is the skewness of a chiSquare distribution with 5 degrees of freedom?

.   5 chiSquare theoretical skewness 0
1.2649

      Find the third quartile of a distribution whose minimum value is 5, maximum value is 10 and most frequent value is 9:   What is the critical value of the test statistic for a one-sided upper-tail t-test with 5 degrees of freedom and a significance level of .01?

   5 9 10 triangular theoretical quartile 3
8.87298

       From past experience, an insurance company knows there is a 50% chance there will be no claims in the next week, a 25% chance there will be exactly 1 claim, a 15% chance there will be 2 claims and a 10% chance there will be 3 claims.     What is the expected number of claims?

   RF←0 1 2 3,[1.5]0.5 0.25 0.15 0.1
    RF theoretical mean 0

0.85

What is the variance?

        RF theoretical var 0
1.0275