To define a discrete random quantity, enter the matrix, in which the first line — values, and the second — the corresponding probabilities (numbers that are in the range from 0 to 1). For example: DRQ = ([1,2,3,4,5],[0.4,0.1,0.1,0.2,0.2]).
There are the following functions for working with discrete random variable:
mathExpectation(DRQ) calculates the expectation of a discrete random variable $DRQ$.
dispersion(DRQ) calculates the variance of a discrete random variable $DRQ$.
meanSquareDeviation(DRQ) calculates the standard deviation of a discrete random variable $DRQ$.
addQU(DRQ1, DRQ2) adds the two discrete random variables $DRQ1$ and $DRQ2$.
multiplyQU(DRQ1, DRQ2) multiplies two discrete random variables $DRQ1$ and $DRQ2$.
covariance(DRQ1, DRQ2) calculates the covariance coefficient of two discrete random variables $DRQ1$ and $DRQ2$.
correlation(DRQ1, DRQ2) calculates the correlation coefficient of two discrete random variables $DRQ1$ and $DRQ2$.
plotPolygonDistribution(DRQ, V) building polygon distributions of discrete random variable $DRQ$.
plotDistributionFunction(DRQ, V) constructing the distribution function of a discrete random variable $DRQ$, where $V$ — is the matrix of one row, 4 elements that define the boundaries Graphics: $[x1, x2, y1, y2]$.
simplifyQU(DRQ) simplify a discrete random variable $DRQ$.
Function for sampling:
W-matrix of a single line. For example, $[1, 7, 10, 15]$.
sampleMean(S) calculates the sample mean of the sample $S$.
sampleDispersion(S) calculates the sample variance of the sample $S$.
covarianceCoefficient(S1, S2) calculates the coefficient of covariance for 2 sampling $S1$ and $S2$.
correlationCoefficient(S1, S2) calculates the correlation coefficient for 2 sampling $S1$ and $S2$.