Manuals/calci/DISCRETE
Jump to navigation
Jump to search
RANDOMNUMBERGENERATION(NumVariable,RandomNumber,Distribution,NewTableFlag,ValueArr,Probability)
where,
- Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle NumVariable} represents the number of columns for displaying the random numbers,
- Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle RandomNumber} represents the number of rows for displaying the random numbers,
- Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle Distribution} is the distribution method (i.e. "Discrete") for creating random values,
- Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle NewTableFlag} is the flag TRUE or FALSE.
- Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle ValueArr} represents the array of values,
- Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle Probability} are the probability values between 0 to 1.
DISCRETE RANDOMNUMBERGENERATION() is used to display the random numbers within finite range.
Description
RANDOMNUMBERGENERATION(NumVariable,RandomNumber,"Discrete",ValueArr,Probability)
- A discrete distribution is a distribution of a random variable that takes only finite set of values.
- If Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle NewTableFlag} is TRUE, the result is displayed on new zspace.
- If Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle NewTableFlag} is FALSE, the result is displayed on the same zcube. If omitted, it is assumed to be FALSE.
- If Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle NumVariable} <0 or Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle RandomNumber} <0, Calci displays an error message.
- If Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle Probability} <0 or Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle Probability} >1, Calci displays an error message.
- The addition of all probability values should be equal to '1'. Else Calci displays an error message.
Examples
=RANDOMNUMBERGENERATION(3,4,"Discrete",TRUE,[4,5,6,3,2,1],[0.2,0.1,0.3,0.2,0.1,0.1])
The above command displays the random numbers from the ValueArr with the respective probabilities in 3 columns and 4 rows in a separate zspace as -
| 3 | 1 | 3 |
| 4 | 4 | 6 |
| 3 | 6 | 6 |
| 1 | 3 | 3 |
=RANDOMNUMBERGENERATION(2,5,"Discrete",TRUE,[10,11,10.5],[0.4,0.4,0.2])
The above command displays the random numbers from the ValueArr with the respective probabilities in 2 columns and 5 rows in the same zspace as command -
| 10 | 11 |
| 11 | 10 |
| 10.5 | 11 |
| 10.5 | 11 |
| 10 | 11 |