Difference between revisions of "Manuals/calci/RANDOMNUMBERGENERATION"

From ZCubes Wiki
Jump to navigation Jump to search
(Created page with "<div id="6SpaceContent" class="zcontent" align="left"> '''RANDOMNUMBERGENERATION'''(Number, RandomNumber, "uniform",  NewTableFlag, MinNum, MaxNum) '''RANDOMNUMBERGENE...")
 
 
(8 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<div id="6SpaceContent" class="zcontent" align="left">
+
<div style="font-size:30px">'''RANDOMNUMBERGENERATION()'''</div><br/>
  
'''RANDOMNUMBERGENERATION'''(Number, RandomNumber, "uniform",  NewTableFlag, MinNum, MaxNum)
+
**RANDOMNUMBERGENERATION(), creates a number of several types of random numbers including Uniform, Normal, Bernoulli, Poisson, Patterned and Discrete.
  
'''RANDOMNUMBERGENERATION'''(Number, RandomNumber, "normal", NewTableFlag, Mean, StandardDeviation)
 
  
'''RANDOMNUMBERGENERATION'''(Number, RandomNumber, "binomial",  NewTableFlag, ProbabilityValue,Trials)
+
== Description ==
  
'''RANDOMNUMBERGENERATION'''(Number, RandomNumber, Distribution(bernoulli),  NewTableFlag, ProbabilityValue)
+
1)'''RANDOM NUMBER GENERATION - UNIFORM'''
  
'''RANDOMNUMBERGENERATION'''(Number, RandomNumber, Distribution(patterned),  NewTableFlag, FromNum, ToNum, StepSize, NumRep)
+
*Uniform Distribution is a distribution of a random variable in which each value has the same probability of occurrence.
  
'''RANDOMNUMBERGENERATION'''(Number, RandomNumber, Distribution(discrete),  NewTableFlag, Value, Probability)
+
RANDOMNUMBERGENERATION(NumVariable,RandomNumber,"Uniform",NewTableFlag,MinNum,MaxNum)
  
where,
+
2)'''RANDOM NUMBER GENERATION - NORMAL'''
  
'''Number '''- represents the number of variables.
+
*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.
  
'''RandomNumber '''- represents the number of random number
+
RANDOMNUMBERGENERATION(NumVariable,RandomNumber,"Normal",NewTableFlag,Mean,StandardDeviation)
  
'''Distribution '''- represents the distribution method(i.e uniform, normal, binomial, bernoulli, patterned, discrete) to create random values.
+
3)'''RANDOM NUMBER GENERATION - BERNOULLI'''
  
'''NewTableFlag''' - is the TRUE or FALSE.If set as TRUE,the result in new sheet. If NewTableFlag is omitted, it assumed to be FALSE.
+
*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.
  
'''MinNum '''- represents the lower bound.
+
RANDOMNUMBERGENERATION(NumVariable,RandomNumber,"Bernoulli",NewTableFlag,ProbabilityValue)
  
'''MaxNum '''- represents the upper bound.
+
4)'''RANDOM NUMBER GENERATION - BINOMIAL'''
  
'''Mean '''- represents the Mean.
+
*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.
  
'''StandardDeviation '''- represents the standard deviation.
+
RANDOMNUMBERGENERATION(NumVariable,RandomNumber,"Binomial",NewTableFlag,ProbabilityValue,NumTrials)
  
'''ProbabilityValue '''- represents the probability value and should be in range 0 to 1.
+
5)'''RANDOM NUMBER GENERATION - POISSON'''  
  
'''Trails''' - represents the number of trials.
+
*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.
  
'''ProbabilityValue '''- represents the probability value and should be in range 0 to 1.
+
RANDOMNUMBERGENERATION(NumVariable,RandomNumber,"Poisson",NewTableFlag,Lambda)
  
'''FromNum '''- represents the start number.
+
6)'''RANDOM NUMBER GENERATION - PATTERENED'''
  
'''ToNum '''- represents the end number.
+
*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.
  
'''StepSize '''- represents the repeating the number.
+
RANDOMNUMBERGENERATION(NumVariable,RandomNumber,"Patterened",NewTableFlag,FromNum,ToNum,StepSize,NumRep,SeqRep)
  
'''NumRep '''- represents the repeating the sequence.
+
7)'''RANDOM NUMBER GENERATION - DISCRETE'''
  
</div>
+
*A discrete distribution is a distribution of a random variable that takes only finite set of values.
----
 
<div id="1SpaceContent" class="zcontent" align="left">
 
  
In Uniform Distribution, elements has an equal probability of being chosen at each draw.
+
RANDOMNUMBERGENERATION(NumVariable,RandomNumber,"Discrete",Value,Probability)
  
Normal Distribution characterized by a mean and a standard deviation.
+
where,
 +
*<math>NumVariable</math> represents the number of variables,
 +
*<math>RandomNumber</math> represents the number of random numbers,
 +
*<math>NewTableFlag</math> 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.
 +
*<math>MinNum</math> is the lower limit of number from which random numbers are to be displayed,
 +
*<math>MaxNum</math> is the upper limit of number up to which random numbers are to be displayed,
 +
*<math>Mean</math> represents the mean value,
 +
*<math>StandardDeviation</math> represents the standard deviation,
 +
*<math>ProbabilityValue</math> represents the probability value that should be in the range 0 to 1,
 +
*<math>NumTrials</math> represents the number of trials to be performed,
 +
*<math>Lambda</math> is a positive real number,
 +
*<math>FromNum</math> represents the starting number,
 +
*<math>ToNum</math> represents the ending number,
 +
*<math>StepSize</math> represents the step size in which numbers are to be grouped,
 +
*<math>NumRep</math> represents the number of times, the mentioned numbers can be repeated,
 +
*<math>SeqRep</math> represents the number of times, the sequence of numbers that can be repeated,
 +
*<math>Value</math> is the number value,
 +
*<math>Probability</math> is the probability value between 0 to 1. The addition of all probabilities in the array should be equal to 1.
  
In Binomial Distribution, the frequency distribution of the probability of a specified number of successes is an arbitrary number of repeated independent Bernoulli trials.
+
=Examples=
 +
1)'''RANDOM NUMBER GENERATION - UNIFORM'''
  
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.A theoretical distribution of the number of successes.
+
=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 -
 +
<div id="5SpaceContent" class="zcontent" align="left">
  
A patterned distribution is a distribution  of random occurrences in which one occurrence has repeating number and sequence in between start and end number.
+
{| class="SpreadSheet blue"
 
+
|+ RANDOM NUMBER GENERATION<br />UNIFORM DISTRIBUTION
A discrete distribution is a distribution of a random variable that takes only finite set of values.
 
 
 
</div>
 
----
 
<div id="7SpaceContent" class="zcontent" align="left">
 
 
 
Lets see an example in (Column1Row1)
 
 
 
<nowiki>=RANDOMNUMBERGENERATION(3, 4, "Uniform", TRUE, 3, 4)</nowiki>
 
 
 
RANDOMNUMBERGENERATION returns the result in new sheet(5Space).
 
 
 
<nowiki>=RANDOMNUMBERGENERATION(3, 4, "Bernoulli", TRUE, 0.5)</nowiki>
 
 
 
RANDOMNUMBERGENERATION returns the result in new sheet(9Space).
 
 
 
<nowiki>=RANDOMNUMBERGENERATION(3, 4, "Binomial", TRUE, 0.75, 5)</nowiki>
 
 
 
RANDOMNUMBERGENERATION returns the result in new sheet(14Space).
 
 
 
<nowiki>=RANDOMNUMBERGENERATION(3, 4, "Normal", TRUE, 0, 4)</nowiki>
 
 
 
RANDOMNUMBERGENERATION returns the result in new sheet(13Space).
 
 
 
<nowiki>=RANDOMNUMBERGENERATION(3, 4, "discrete", TRUE,[4,5,6,3,2,1],[0.2,0.1,0.3,0.2,0.1,0.1])</nowiki>
 
 
 
RANDOMNUMBERGENERATION returns the result in new sheet(15Space).
 
 
 
<nowiki>=RANDOMNUMBERGENERATION(3, 4, "Patterned", TRUE,1, 5, 3, 4 )</nowiki>
 
 
 
RANDOMNUMBERGENERATION returns the result in new sheet(16Space).
 
 
 
<nowiki>=RANDOMNUMBERGENERATION(-3, 4, "Uniform", TRUE, 3, 4)</nowiki>
 
 
 
RANKANDPERCENTILE returns the #ERROR(Number &lt; 0).
 
 
 
<span class="zCubesMenuIconTop" title="Account Management, Profiles and Documents"> <br /></span></div>
 
----
 
<div id="12SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="left">
 
 
 
RANDOM NUMBER GENERATION
 
 
 
</div></div>
 
----
 
<div id="10SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify">Syntax </div><div class="ZEditBox"><center></center></div></div>
 
----
 
<div id="4SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify">Remarks </div></div>
 
----
 
<div id="3SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify">Examples </div></div>
 
----
 
<div id="11SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify">Description </div></div>
 
----
 
<div id="8SpaceContent" class="zcontent" align="left">
 
 
 
If Number &lt; 0 or RandomNumber &lt; 0, RANDOMNUMBERGENERATION returns the #ERROR.
 
 
 
RANDOMNUMBERGENERATION returns the #ERROR, if ProbabilityValue &lt; 0 or  ProbabilityValue &gt; 1, Trails &lt; 0, Probability&lt; 0 or Probability &gt;1,StepSize &lt; 0 or NumRep &lt; 0.
 
 
 
</div>
 
----
 
<div id="2SpaceContent" class="zcontent" align="left">
 
 
 
{| id="TABLE3" class="SpreadSheet blue"
 
|+ Default Calci
 
 
|- class="even"
 
|- class="even"
| class=" " |
+
| 5.8789049801416695
| Column1
+
| 5.18899653604999
| class="  " | Column2
+
| 5.180827819975093
| Column3
 
| Column4
 
 
|- class="odd"
 
|- class="odd"
| class=" " | Row1
+
| 5.115265252068639
| class="sshl_f" | 5Space
+
| 5.2858030195347965
| class=" " |
+
| 5.402900551678613
| class="sshl_f" | 16Space
 
| class=" " |
 
 
|- class="even"
 
|- class="even"
| class="  " | Row2
+
| 5.144692060537636
| class="      1" |
+
| 5.92010664450936
| class="sshl_f" | 9Space
+
| 5.1186514620203525
| class="    SelectTD1 ChangeBGColor SelectTD1" |
 
<div id="2Space_Handle" class="zhandles" title="Click and Drag to resize CALCI Column/Row/Cell. It is EZ!"></div><div id="2Space_Copy" class="zhandles" title="Click and Drag over to AutoFill other cells."></div><div id="2Space_Drag" class="zhandles" title="Click and Drag to Move/Copy Area.">[[Image:copy-cube.gif]]  </div>
 
| class=" " |
 
 
|- class="odd"
 
|- class="odd"
| Row3
+
| 5.1120118191465735
| class="sshl_f" |
+
| 5.600173528306186
| class="    " |
+
| 5.73099215483918
| class=" " |
 
| class=" " |
 
|- class="even"
 
| Row4
 
| class="sshl_f" | 13Space
 
| class="          1" |
 
| class="sshl_f" | 15Space
 
| class=" " |
 
|- class="odd"
 
| class=" " | Row5
 
| class="    " |
 
| class="sshl_f" |
 
| class="      " |
 
| class=" " |
 
|- class="even"
 
| Row6
 
| class="sshl_f" | 14Space
 
| class="            " |
 
| class="  " |
 
| class=" " |
 
 
|}
 
|}
  
{|
 
| <span align="left">[[Image:calci1.gif]]</span>
 
|
 
|
 
[[Image:bold.gif]]
 
|
 
[[Image:italic.gif]]
 
|
 
[[Image:normal.gif]]
 
|
 
[[Image:underline.gif]]
 
|
 
[[Image:border.gif]]
 
|
 
[[Image:numbers.gif]]
 
|
 
[[Image:sort.gif]]
 
|
 
[[Image:formatcells.gif]]
 
|
 
[[Image:graphs.gif]]
 
| $
 
|}
 
  
</div>
+
2)'''RANDOM NUMBER GENERATION - NORMAL'''
----
+
 
<div id="5SpaceContent" class="zcontent" align="left">
+
=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 -
 +
<div id="13SpaceContent" class="zcontent" align="left">
  
 
{| class="SpreadSheet blue"
 
{| class="SpreadSheet blue"
|+ Random Number Generation<br />Uniform Distribution
+
|+ RANDOM NUMBER GENERATION<br />NORMAL DISTRIBUTION
 
|- class="even"
 
|- class="even"
| 3.0065124671093137
+
| -1.5245436919755557
| 3.677568717214598
+
| -6.046269527646613
| 3.4744283915732352
+
| 7.843060120091054
 
|- class="odd"
 
|- class="odd"
| 3.163743257588417
+
| -4.99041508530561
| 3.6853662386924406
+
| 2.0475653687764797
| 3.0128586791349416
+
| 1.0692363700059668
 
|- class="even"
 
|- class="even"
| 3.4533329456853092
+
| -9.951431717086086
| 3.0895808098399992
+
| -8.852998766212627
| 3.1303954347733547
+
| -13.249367223311992
 
|- class="odd"
 
|- class="odd"
| 3.55900044450085
+
| -9.518132247255
| 3.0393674387757006
+
| -3.2885069101479694
| 3.0808581511315527
+
| -7.017288915222489
 
|}
 
|}
  
</div>
+
 
----
+
3)'''RANDOM NUMBER GENERATION - BERNOULLI'''
<div id="9SpaceContent" class="zcontent" align="left">
+
 
 +
=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"
 
{| class="SpreadSheet blue"
|+ Random Number Generation<br />Bernoulli Distribution
+
|+ RANDOM NUMBER GENERATION<br />BERNOULLI DISTRIBUTION
 
|- class="even"
 
|- class="even"
 +
| 1
 +
| 0
 
| 0
 
| 0
| 1
 
| 1
 
 
|- class="odd"
 
|- class="odd"
 
| 1
 
| 1
Line 237: Line 148:
 
| 0
 
| 0
 
| 1
 
| 1
| 0
+
| 1
 
|}
 
|}
 +
  
</div>
+
4)'''RANDOM NUMBER GENERATION - BINOMIAL'''
----
 
<div id="13SpaceContent" class="zcontent" align="left">
 
  
{| class="SpreadSheet blue"
+
=RANDOMNUMBERGENERATION(3, 4, "Binomial", TRUE, 0.75, 5)
|+ Random Number Generation<br />Normal Distribution
 
|- class="even"
 
| 7.3992591238306735
 
| -6.403583675547587
 
| 5.264094078919947
 
|- class="odd"
 
| 1.1468478642534703
 
| 1.6270109725799506
 
| -5.689357936346091
 
|- class="even"
 
| -4.82901237541827
 
| -4.166206583582642
 
| -4.860569757430193
 
|- class="odd"
 
| 2.9239233886923936
 
| -5.044394778185275
 
| 2.9528738508087664
 
|}
 
 
 
</div>
 
----
 
<div id="14SpaceContent" class="zcontent" align="left">
 
  
 +
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 -
 +
<div id="13SpaceContent" class="zcontent" align="left">
 
{| class="SpreadSheet blue"
 
{| class="SpreadSheet blue"
|+ Random Number Generation<br />Binomial Distribution
+
|+ RANDOM NUMBER GENERATION<br />BINOMIAL DISTRIBUTION
 
|- class="even"
 
|- class="even"
| 5
+
| 0
| 4
+
| 2
| 4
+
| 3
 
|- class="odd"
 
|- class="odd"
| 5
+
| 2
| 4
 
 
| 4
 
| 4
 +
| 2
 
|- class="even"
 
|- class="even"
| 4
+
| 2
| 5
+
| 3
| 5
+
| 2
 
|- class="odd"
 
|- class="odd"
| 4
+
| 0
| 5
+
| 2
| 4
+
| 2
 
|}
 
|}
  
</div>
 
----
 
<div id="15SpaceContent" class="zcontent" align="left">
 
  
 +
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 -
 +
<div id="13SpaceContent" class="zcontent" align="left">
 
{| class="SpreadSheet blue"
 
{| class="SpreadSheet blue"
|+ Random Number Generation<br />Discrete Distribution
+
|+ RANDOM NUMBER GENERATION<br />POISSON DISTRIBUTION
 
|- class="even"
 
|- class="even"
 +
| 0
 +
| 0
 +
| 0
 +
|- class="odd"
 +
| 0
 
| 1
 
| 1
| 4
+
| 0
| 6
+
|- class="even"
|- class="odd"
 
 
| 1
 
| 1
 
| 1
 
| 1
| 3
+
| 0
|- class="even"
+
|- class="odd"
| 5
 
| 3
 
 
| 2
 
| 2
|- class="odd"
+
| 0
| 1
+
| 0
| 6
 
| 3
 
 
|}
 
|}
  
</div>
 
----
 
<div id="16SpaceContent" class="zcontent" align="left">
 
  
 +
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 -
 +
<div id="13SpaceContent" class="zcontent" align="left">
 
{| class="SpreadSheet blue"
 
{| class="SpreadSheet blue"
|+ Random Number Generation<br />Patterned Distribution
+
|+ RANDOM NUMBER GENERATION<br />PATTERNED DISTRIBUTION
 
|- class="even"
 
|- class="even"
| 1
+
| 2
| 1
+
| 2
| 1
+
| 2
 +
| 2
 +
| 2
 
|- class="odd"
 
|- class="odd"
| 1
+
| 2
| 1
+
| 2
| 1
+
| 2
|- class="even"
+
| 2
| 1
+
| 2
| 1
 
| 1
 
|- class="odd"
 
| 1
 
| 1
 
| 1
 
 
|- class="even"
 
|- class="even"
 +
| 4
 +
| 4
 
| 4
 
| 4
 
| 4
 
| 4
Line 342: Line 234:
 
| 4
 
| 4
 
| 4
 
| 4
|- class="even"
 
 
| 4
 
| 4
 
| 4
 
| 4
 +
|- class="even"
 +
| 6
 +
| 6
 +
| 6
 +
| 6
 +
| 6
 +
|- class="odd"
 +
| 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 -
 +
<div id="13SpaceContent" class="zcontent" align="left">
 +
{| class="SpreadSheet blue"
 +
|+ RANDOM NUMBER GENERATION<br />DISCRETE DISTRIBUTION
 +
|- class="even"
 
| 4
 
| 4
 +
| 2
 +
| 3
 
|- class="odd"
 
|- class="odd"
 +
| 2
 +
| 1
 +
| 2
 +
|- class="even"
 
| 4
 
| 4
 
| 4
 
| 4
| 4
+
| 6
|- class="even"
 
| 5
 
| 5
 
| 5
 
 
|- class="odd"
 
|- class="odd"
| 5
+
| 6
| 5
+
| 6
| 5
+
| 6
|- class="even"
 
| 5
 
| 5
 
| 5
 
|- class="odd"
 
| 5
 
| 5
 
| 5
 
 
|}
 
|}
  
</div>
+
==Related Videos==
----
+
 
 +
{{#ev:youtube|Z_b3iSEbvtA|280|center|RANDOMNUMBERGENERATION}}
 +
 
 +
==See Also==
 +
 
 +
*[[Manuals/calci/RAND | RAND]]
 +
 
 +
== References ==
 +
*[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 17:25, 24 July 2018

RANDOMNUMBERGENERATION()


    • 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 -

RANDOM NUMBER GENERATION
UNIFORM DISTRIBUTION
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 -

RANDOM NUMBER GENERATION
NORMAL DISTRIBUTION
-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 -

RANDOM NUMBER GENERATION
BERNOULLI DISTRIBUTION
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 -

RANDOM NUMBER GENERATION
BINOMIAL DISTRIBUTION
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 -

RANDOM NUMBER GENERATION
POISSON DISTRIBUTION
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 -

RANDOM NUMBER GENERATION
PATTERNED DISTRIBUTION
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 -

RANDOM NUMBER GENERATION
DISCRETE DISTRIBUTION
4 2 3
2 1 2
4 4 6
6 6 6

Related Videos

RANDOMNUMBERGENERATION

See Also

References