Difference between revisions of "Manuals/calci/RANDOMNUMBERGENERATION"
(5 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
− | =RANDOMNUMBERGENERATION() | + | <div style="font-size:30px">'''RANDOMNUMBERGENERATION()'''</div><br/> |
+ | |||
+ | **RANDOMNUMBERGENERATION(), creates a number of several types of random numbers including Uniform, Normal, Bernoulli, Poisson, Patterned and Discrete. | ||
− | |||
== Description == | == Description == | ||
Line 125: | Line 126: | ||
=RANDOMNUMBERGENERATION(3, 4, "Bernoulli", TRUE, 0.5) | =RANDOMNUMBERGENERATION(3, 4, "Bernoulli", TRUE, 0.5) | ||
+ | |||
+ | The above command displays the random numbers with probability value '0.5'. The numbers are displayed in 3 columns and 4 rows in a separate zspace as - | ||
+ | |||
+ | <div id="13SpaceContent" class="zcontent" align="left"> | ||
+ | |||
+ | {| class="SpreadSheet blue" | ||
+ | |+ RANDOM NUMBER GENERATION<br />BERNOULLI DISTRIBUTION | ||
+ | |- class="even" | ||
+ | | 1 | ||
+ | | 0 | ||
+ | | 0 | ||
+ | |- class="odd" | ||
+ | | 1 | ||
+ | | 1 | ||
+ | | 0 | ||
+ | |- class="even" | ||
+ | | 1 | ||
+ | | 0 | ||
+ | | 1 | ||
+ | |- class="odd" | ||
+ | | 0 | ||
+ | | 1 | ||
+ | | 1 | ||
+ | |} | ||
Line 251: | Line 276: | ||
| 6 | | 6 | ||
|} | |} | ||
+ | |||
+ | ==Related Videos== | ||
+ | |||
+ | {{#ev:youtube|Z_b3iSEbvtA|280|center|RANDOMNUMBERGENERATION}} | ||
+ | |||
+ | ==See Also== | ||
+ | |||
+ | *[[Manuals/calci/RAND | RAND]] | ||
== References == | == References == | ||
*[http://en.wikipedia.org/wiki/Random_number_generation Random Number Generation] | *[http://en.wikipedia.org/wiki/Random_number_generation Random Number Generation] | ||
+ | |||
+ | |||
+ | |||
+ | *[[Z_API_Functions | List of Main Z Functions]] | ||
+ | |||
+ | *[[ Z3 | Z3 home ]] |
Latest revision as of 16:25, 24 July 2018
- RANDOMNUMBERGENERATION(), creates a number of several types of random numbers including Uniform, Normal, Bernoulli, Poisson, Patterned and Discrete.
Description
1)RANDOM NUMBER GENERATION - UNIFORM
- Uniform Distribution is a distribution of a random variable in which each value has the same probability of occurrence.
RANDOMNUMBERGENERATION(NumVariable,RandomNumber,"Uniform",NewTableFlag,MinNum,MaxNum)
2)RANDOM NUMBER GENERATION - NORMAL
- A Normal Distribution is a type of distribution that plots all of its values in a symmetrical fashion and most of the results are situated around the probability's mean.
RANDOMNUMBERGENERATION(NumVariable,RandomNumber,"Normal",NewTableFlag,Mean,StandardDeviation)
3)RANDOM NUMBER GENERATION - BERNOULLI
- A theoretical distribution of the number of successes in a finite set of independent trials with a constant probability of success is called Bernoulli Distribution.
RANDOMNUMBERGENERATION(NumVariable,RandomNumber,"Bernoulli",NewTableFlag,ProbabilityValue)
4)RANDOM NUMBER GENERATION - BINOMIAL
- A Binomial Distribution is a frequency distribution of the possible number of successful outcomes in a given number of trials in each of which there is the same probability of success.
RANDOMNUMBERGENERATION(NumVariable,RandomNumber,"Binomial",NewTableFlag,ProbabilityValue,NumTrials)
5)RANDOM NUMBER GENERATION - POISSON
- A Poisson Distribution is a discrete frequency distribution that gives the probability of a number of independent events occurring in a fixed time. Poisson distribution can be applied to systems with a large number of possible events.
RANDOMNUMBERGENERATION(NumVariable,RandomNumber,"Poisson",NewTableFlag,Lambda)
6)RANDOM NUMBER GENERATION - PATTERENED
- A Patterned Distribution is a distribution of random occurrences in which one occurrence has repeating number and sequence in between the start and the end numbers.
RANDOMNUMBERGENERATION(NumVariable,RandomNumber,"Patterened",NewTableFlag,FromNum,ToNum,StepSize,NumRep,SeqRep)
7)RANDOM NUMBER GENERATION - DISCRETE
- A discrete distribution is a distribution of a random variable that takes only finite set of values.
RANDOMNUMBERGENERATION(NumVariable,RandomNumber,"Discrete",Value,Probability)
where,
- represents the number of variables,
- represents the number of random numbers,
- is the flag TRUE or FALSE. If flag is TRUE, the result is displayed on new zspace. If flag is FALSE, the result is displayed on the same Zcube. If omitted, it is assumed to be FALSE.
- is the lower limit of number from which random numbers are to be displayed,
- is the upper limit of number up to which random numbers are to be displayed,
- represents the mean value,
- represents the standard deviation,
- represents the probability value that should be in the range 0 to 1,
- represents the number of trials to be performed,
- is a positive real number,
- represents the starting number,
- represents the ending number,
- represents the step size in which numbers are to be grouped,
- represents the number of times, the mentioned numbers can be repeated,
- represents the number of times, the sequence of numbers that can be repeated,
- is the number value,
- is the probability value between 0 to 1. The addition of all probabilities in the array should be equal to 1.
Examples
1)RANDOM NUMBER GENERATION - UNIFORM
=RANDOMNUMBERGENERATION(3, 4, "Uniform", TRUE, 5, 6)
The above command displays the random numbers in between 5 and 6. The numbers are displayed in 3 columns and 4 rows in a separate zspace as -
5.8789049801416695 | 5.18899653604999 | 5.180827819975093 |
5.115265252068639 | 5.2858030195347965 | 5.402900551678613 |
5.144692060537636 | 5.92010664450936 | 5.1186514620203525 |
5.1120118191465735 | 5.600173528306186 | 5.73099215483918 |
2)RANDOM NUMBER GENERATION - NORMAL
=RANDOMNUMBERGENERATION(3, 4, "Normal", TRUE, 0, 4)
The above command displays the random numbers with Mean '0' and Standard Deviation '4'. The numbers are displayed in 3 columns and 4 rows in a separate zspace as -
-1.5245436919755557 | -6.046269527646613 | 7.843060120091054 |
-4.99041508530561 | 2.0475653687764797 | 1.0692363700059668 |
-9.951431717086086 | -8.852998766212627 | -13.249367223311992 |
-9.518132247255 | -3.2885069101479694 | -7.017288915222489 |
3)RANDOM NUMBER GENERATION - BERNOULLI
=RANDOMNUMBERGENERATION(3, 4, "Bernoulli", TRUE, 0.5)
The above command displays the random numbers with probability value '0.5'. The numbers are displayed in 3 columns and 4 rows in a separate zspace as -
1 | 0 | 0 |
1 | 1 | 0 |
1 | 0 | 1 |
0 | 1 | 1 |
4)RANDOM NUMBER GENERATION - BINOMIAL
=RANDOMNUMBERGENERATION(3, 4, "Binomial", TRUE, 0.75, 5)
The above command displays the random numbers with probability value '0.75' and number of trials '5'. The numbers are displayed in 3 columns and 4 rows in a separate zspace as -
0 | 2 | 3 |
2 | 4 | 2 |
2 | 3 | 2 |
0 | 2 | 2 |
5)RANDOM NUMBER GENERATION - POISSON
=RANDOMNUMBERGENERATION(3,4,"Poisson",TRUE,0.5)
The above command displays the random numbers with Lamda value '0.5'. The numbers displayed in 3 columns and 4 rows in a separate zspace as -
0 | 0 | 0 |
0 | 1 | 0 |
1 | 1 | 0 |
2 | 0 | 0 |
6)RANDOM NUMBER GENERATION - PATTERENED
=RANDOMNUMBERGENERATION(5,4,"Patterned",TRUE,2,6,2,2)
The above command displays the random numbers from 2 to 6 in steps of 2. The numbers are repeated twice and result is displayed in 5 columns and 4 rows in a separate zspace as -
2 | 2 | 2 | 2 | 2 |
2 | 2 | 2 | 2 | 2 |
4 | 4 | 4 | 4 | 4 |
4 | 4 | 4 | 4 | 4 |
6 | 6 | 6 | 6 | 6 |
6 | 6 | 6 | 6 | 6 |
7)RANDOM NUMBER GENERATION - DISCRETE
=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 Value Array with the respective probabilities in Probability Array. The numbers are displayed in 3 columns and 4 rows in a separate zspace as -
4 | 2 | 3 |
2 | 1 | 2 |
4 | 4 | 6 |
6 | 6 | 6 |
Related Videos
See Also
References