Difference between revisions of "Manuals/calci/DISCRETE"

From ZCubes Wiki
Jump to navigation Jump to search
(Created page with "<div id="6SpaceContent" class="zcontent" align="left"> '''RANDOMNUMBERGENERATION'''(Number, RandomNumber, Distribution,  NewTableFlag, Value, Probability) where, ''...")
 
Line 1: Line 1:
<div id="6SpaceContent" class="zcontent" align="left">
+
=RANDOMNUMBERGENERATION(NumVariable,RandomNumber,Distribution,NewTableFlag,ValueArr,Probability)=
 
 
'''RANDOMNUMBERGENERATION'''(Number, RandomNumber, Distribution,  NewTableFlag, Value, Probability)
 
  
 
where,
 
where,
 +
*<math>NumVariable</math> represents the number of columns for displaying the random numbers,
 +
*<math>RandomNumber</math> represents the number of rows for displaying the random numbers,
 +
*<math>Distribution</math> is the distribution method (i.e. "Discrete") for creating random values,
 +
*<math>NewTableFlag</math> is the flag TRUE or FALSE.
 +
*<math>ValueArr</math> represents the array of values,
 +
*<math>Probability</math> are the probability values between 0 to 1.
  
'''Number '''- represents the number of variables.
+
DISCRETE RANDOMNUMBERGENERATION() is used to display the random numbers within finite range.
  
'''RandomNumber '''- represents the number of random number
+
=Description=
  
'''Distribution '''- represents the distribution method(i.e discrete) to create random values.
+
RANDOMNUMBERGENERATION(NumVariable,RandomNumber,"Discrete",ValueArr,Probability)
  
'''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 discrete distribution is a distribution of a random variable that takes only finite set of values.
 +
*If <math>NewTableFlag</math> is TRUE, the result is displayed on new zspace.  
 +
*If <math>NewTableFlag</math> is FALSE, the result is displayed on the same zcube. If omitted, it is assumed to be FALSE.
 +
*If <math>NumVariable</math> &lt;0 or <math>RandomNumber</math> &lt;0, Calci displays an error message.
 +
*If <math>Probability</math> &lt;0 or <math>Probability</math> &gt;1, Calci displays an error message.
 +
*The addition of all probability values should be equal to '1'. Else Calci displays an error message.
  
'''ValueArr '''- represents the values.
+
=Examples=
  
'''Probability '''- represents the probability value.
+
=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 -
  
</div>
+
{| class="wikitable"
----
+
|-
<div id="1SpaceContent" class="zcontent" align="left">A discrete distribution is a distribution of a random variable that takes only finite set of values</div>
+
| 3 || 1 || 3
----
+
|-
<div id="7SpaceContent" class="zcontent" align="left">
+
| 4 || 4 || 6
 
+
|-
Lets see an example in (Column1Row1)
+
| 3 || 6 || 6
 
+
|-
<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>
+
| 1 || 3 || 3
 
 
RANDOMNUMBERGENERATION returns the result in new sheet(13Space).
 
 
 
<nowiki>=RANDOMNUMBERGENERATION(5, 4, "discrete", TRUE, [2,1],[0.3,0.9])</nowiki>
 
 
 
RANDOMNUMBERGENERATION returns the #ERROR(sumofProbability &gt;1).
 
 
 
</div>
 
----
 
<div id="12SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="left">
 
 
 
RANDOM NUMBER GENERATION : DISCRETE
 
 
 
</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 Probability&lt; 0 or Probability &gt;1.
 
 
 
</div>
 
----
 
<div id="5SpaceContent" class="zcontent" align="left">
 
 
 
{| id="TABLE1" class="SpreadSheet blue"
 
|+ Random Number Generation<br />Binomial Distribution
 
|- class="even"
 
| 0
 
| 1
 
| 1
 
|- class="odd"
 
| 1
 
| 0
 
| 2
 
|- class="even"
 
| 0
 
| 2
 
| 1
 
|- class="odd"
 
| 1
 
| 1
 
| 1
 
 
|}
 
|}
  
</div>
 
----
 
<div id="9SpaceContent" class="zcontent" align="left">
 
 
{| id="TABLE2" class="SpreadSheet blue"
 
|+ Random Number Generation<br />Poisson Distribution
 
|- class="even"
 
| 0
 
| 0
 
| 1
 
|- class="odd"
 
| 1
 
| 1
 
| 2
 
|- class="even"
 
| 0
 
| 1
 
| 0
 
|- class="odd"
 
| 2
 
| 2
 
| 1
 
|}
 
  
</div>
+
=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 -
<div id="2SpaceContent" class="zcontent" align="left">
 
  
{| id="TABLE3" class="SpreadSheet blue"
+
{| class="wikitable"
|+ Default Calci
+
|-
|- class="even"
+
| 10 || 11
| class=" " |
+
|-
| Column1
+
| 11 || 10
| Column2
+
|-
| Column3
+
| 10.5 || 11
| Column4
+
|-
|- class="odd"
+
| 10.5 || 11
| class=" " | Row1
+
|-
| class="sshl_f" | 13Space
+
| 10 || 11
| class=" " |
 
| class=" " |
 
| class=" " |
 
|- class="even"
 
| class="  " | Row2
 
| 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=" " |
 
| class=" " |
 
|- class="odd"
 
| Row3
 
| class=" " |
 
| class=" " |
 
| class=" " |
 
| class=" " |
 
|- class="even"
 
| Row4
 
| class=" " |
 
| class=" " |
 
| class=" " |
 
| class=" " |
 
|- class="odd"
 
| class=" " | Row5
 
| class=" " |
 
| class=" " |
 
| class=" " |
 
| class=" " |
 
|- class="even"
 
| Row6
 
| class=" " |
 
| class=" " |
 
| class=" " |
 
| class=" " |
 
 
|}
 
|}
  
{|
+
== See Also ==
| <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>
+
*[[Manuals/calci/RANDOMNUMBERGENERATION | RANDOMNUMBERGENERATION]]
----
+
*[[Manuals/calci/PATTERNED | PATTERNED]]
<div id="13SpaceContent" class="zcontent" align="left">
 
  
{| class="SpreadSheet blue"
+
== References ==
|+ Random Number Generation<br />Discrete Distribution
 
|- class="even"
 
| 1
 
| 6
 
| 6
 
|- class="odd"
 
| 4
 
| 5
 
| 5
 
|- class="even"
 
| 3
 
| 1
 
| 6
 
|- class="odd"
 
| 3
 
| 6
 
| 3
 
|}
 
  
</div>
+
*[http://en.wikipedia.org/wiki/Random_number_generation Random Number Generation]
----
+
*[http://en.wikipedia.org/wiki/Probability_distribution#Discrete_probability_distribution Discrete Probability Distribution]

Revision as of 16:57, 30 March 2014

RANDOMNUMBERGENERATION(NumVariable,RandomNumber,Distribution,NewTableFlag,ValueArr,Probability)

where,

  • represents the number of columns for displaying the random numbers,
  • represents the number of rows for displaying the random numbers,
  • is the distribution method (i.e. "Discrete") for creating random values,
  • is the flag TRUE or FALSE.
  • represents the array of values,
  • 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 is TRUE, the result is displayed on new zspace.
  • If is FALSE, the result is displayed on the same zcube. If omitted, it is assumed to be FALSE.
  • If <0 or <0, Calci displays an error message.
  • If <0 or >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

See Also

References