Free Statistics

of Irreproducible Research!

Author's title

Author*The author of this computation has been verified*
R Software Modulerwasp_rngnorm.wasp
Title produced by softwareRandom Number Generator - Normal Distribution
Date of computationFri, 29 Sep 2017 03:39:13 +0200
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2017/Sep/29/t150664971919l3w47uk1jcd32.htm/, Retrieved Thu, 16 May 2024 17:10:43 +0200
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=, Retrieved Thu, 16 May 2024 17:10:43 +0200
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywordsHere I store the 1000 random data
Estimated Impact0




Summary of computational transaction
Raw Input view raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R ServerBig Analytics Cloud Computing Center

\begin{tabular}{lllllllll}
\hline
Summary of computational transaction \tabularnewline
Raw Input view raw input (R code)  \tabularnewline
Raw Outputview raw output of R engine  \tabularnewline
Computing time3 seconds \tabularnewline
R ServerBig Analytics Cloud Computing Center \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=&T=0

[TABLE]
[ROW]
Summary of computational transaction[/C][/ROW] [ROW]Raw Input[/C] view raw input (R code) [/C][/ROW] [ROW]Raw Output[/C]view raw output of R engine [/C][/ROW] [ROW]Computing time[/C]3 seconds[/C][/ROW] [ROW]R Server[/C]Big Analytics Cloud Computing Center[/C][/ROW] [/TABLE] Source: https://freestatistics.org/blog/index.php?pk=&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=&T=0

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

Summary of computational transaction
Raw Input view raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R ServerBig Analytics Cloud Computing Center







ParameterValueStandard Deviation
# simulated values1000-
true mean0-
true standard deviation1-
mean0.02633364702695450.0315783283970744
standard deviation0.998594424355290.022329250148107

\begin{tabular}{lllllllll}
\hline
Parameter & Value & Standard Deviation \tabularnewline
# simulated values & 1000 & - \tabularnewline
true mean & 0 & - \tabularnewline
true standard deviation & 1 & - \tabularnewline
mean & 0.0263336470269545 & 0.0315783283970744 \tabularnewline
standard deviation & 0.99859442435529 & 0.022329250148107 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=&T=1

[TABLE]
[ROW][C]Parameter[/C][C]Value[/C][C]Standard Deviation[/C][/ROW]
[ROW][C]# simulated values[/C][C]1000[/C][C]-[/C][/ROW]
[ROW][C]true mean[/C][C]0[/C][C]-[/C][/ROW]
[ROW][C]true standard deviation[/C][C]1[/C][C]-[/C][/ROW]
[ROW][C]mean[/C][C]0.0263336470269545[/C][C]0.0315783283970744[/C][/ROW]
[ROW][C]standard deviation[/C][C]0.99859442435529[/C][C]0.022329250148107[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=&T=1

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

ParameterValueStandard Deviation
# simulated values1000-
true mean0-
true standard deviation1-
mean0.02633364702695450.0315783283970744
standard deviation0.998594424355290.022329250148107







Frequency Table (Histogram)
BinsMidpointAbs. FrequencyRel. FrequencyCumul. Rel. Freq.Density
[-3.5,-3[-3.2510.0010.0010.002
[-3,-2.5[-2.7520.0020.0030.004
[-2.5,-2[-2.25150.0150.0180.03
[-2,-1.5[-1.75480.0480.0660.096
[-1.5,-1[-1.25960.0960.1620.192
[-1,-0.5[-0.751470.1470.3090.294
[-0.5,0[-0.251680.1680.4770.336
[0,0.5[0.252050.2050.6820.41
[0.5,1[0.751660.1660.8480.332
[1,1.5[1.25860.0860.9340.172
[1.5,2[1.75400.040.9740.08
[2,2.5[2.25160.0160.990.032
[2.5,3[2.7580.0080.9980.016
[3,3.5]3.2520.00210.004

\begin{tabular}{lllllllll}
\hline
Frequency Table (Histogram) \tabularnewline
Bins & Midpoint & Abs. Frequency & Rel. Frequency & Cumul. Rel. Freq. & Density \tabularnewline
[-3.5,-3[ & -3.25 & 1 & 0.001 & 0.001 & 0.002 \tabularnewline
[-3,-2.5[ & -2.75 & 2 & 0.002 & 0.003 & 0.004 \tabularnewline
[-2.5,-2[ & -2.25 & 15 & 0.015 & 0.018 & 0.03 \tabularnewline
[-2,-1.5[ & -1.75 & 48 & 0.048 & 0.066 & 0.096 \tabularnewline
[-1.5,-1[ & -1.25 & 96 & 0.096 & 0.162 & 0.192 \tabularnewline
[-1,-0.5[ & -0.75 & 147 & 0.147 & 0.309 & 0.294 \tabularnewline
[-0.5,0[ & -0.25 & 168 & 0.168 & 0.477 & 0.336 \tabularnewline
[0,0.5[ & 0.25 & 205 & 0.205 & 0.682 & 0.41 \tabularnewline
[0.5,1[ & 0.75 & 166 & 0.166 & 0.848 & 0.332 \tabularnewline
[1,1.5[ & 1.25 & 86 & 0.086 & 0.934 & 0.172 \tabularnewline
[1.5,2[ & 1.75 & 40 & 0.04 & 0.974 & 0.08 \tabularnewline
[2,2.5[ & 2.25 & 16 & 0.016 & 0.99 & 0.032 \tabularnewline
[2.5,3[ & 2.75 & 8 & 0.008 & 0.998 & 0.016 \tabularnewline
[3,3.5] & 3.25 & 2 & 0.002 & 1 & 0.004 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=&T=2

[TABLE]
[ROW][C]Frequency Table (Histogram)[/C][/ROW]
[ROW][C]Bins[/C][C]Midpoint[/C][C]Abs. Frequency[/C][C]Rel. Frequency[/C][C]Cumul. Rel. Freq.[/C][C]Density[/C][/ROW]
[ROW][C][-3.5,-3[[/C][C]-3.25[/C][C]1[/C][C]0.001[/C][C]0.001[/C][C]0.002[/C][/ROW]
[ROW][C][-3,-2.5[[/C][C]-2.75[/C][C]2[/C][C]0.002[/C][C]0.003[/C][C]0.004[/C][/ROW]
[ROW][C][-2.5,-2[[/C][C]-2.25[/C][C]15[/C][C]0.015[/C][C]0.018[/C][C]0.03[/C][/ROW]
[ROW][C][-2,-1.5[[/C][C]-1.75[/C][C]48[/C][C]0.048[/C][C]0.066[/C][C]0.096[/C][/ROW]
[ROW][C][-1.5,-1[[/C][C]-1.25[/C][C]96[/C][C]0.096[/C][C]0.162[/C][C]0.192[/C][/ROW]
[ROW][C][-1,-0.5[[/C][C]-0.75[/C][C]147[/C][C]0.147[/C][C]0.309[/C][C]0.294[/C][/ROW]
[ROW][C][-0.5,0[[/C][C]-0.25[/C][C]168[/C][C]0.168[/C][C]0.477[/C][C]0.336[/C][/ROW]
[ROW][C][0,0.5[[/C][C]0.25[/C][C]205[/C][C]0.205[/C][C]0.682[/C][C]0.41[/C][/ROW]
[ROW][C][0.5,1[[/C][C]0.75[/C][C]166[/C][C]0.166[/C][C]0.848[/C][C]0.332[/C][/ROW]
[ROW][C][1,1.5[[/C][C]1.25[/C][C]86[/C][C]0.086[/C][C]0.934[/C][C]0.172[/C][/ROW]
[ROW][C][1.5,2[[/C][C]1.75[/C][C]40[/C][C]0.04[/C][C]0.974[/C][C]0.08[/C][/ROW]
[ROW][C][2,2.5[[/C][C]2.25[/C][C]16[/C][C]0.016[/C][C]0.99[/C][C]0.032[/C][/ROW]
[ROW][C][2.5,3[[/C][C]2.75[/C][C]8[/C][C]0.008[/C][C]0.998[/C][C]0.016[/C][/ROW]
[ROW][C][3,3.5][/C][C]3.25[/C][C]2[/C][C]0.002[/C][C]1[/C][C]0.004[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=&T=2

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

Frequency Table (Histogram)
BinsMidpointAbs. FrequencyRel. FrequencyCumul. Rel. Freq.Density
[-3.5,-3[-3.2510.0010.0010.002
[-3,-2.5[-2.7520.0020.0030.004
[-2.5,-2[-2.25150.0150.0180.03
[-2,-1.5[-1.75480.0480.0660.096
[-1.5,-1[-1.25960.0960.1620.192
[-1,-0.5[-0.751470.1470.3090.294
[-0.5,0[-0.251680.1680.4770.336
[0,0.5[0.252050.2050.6820.41
[0.5,1[0.751660.1660.8480.332
[1,1.5[1.25860.0860.9340.172
[1.5,2[1.75400.040.9740.08
[2,2.5[2.25160.0160.990.032
[2.5,3[2.7580.0080.9980.016
[3,3.5]3.2520.00210.004



Parameters (Session):
par1 = 1000 ; par2 = 0 ; par3 = 1 ; par4 = 2 ; par5 = N ; par6 = 0 ;
Parameters (R input):
par1 = 1000 ; par2 = 0 ; par3 = 1 ; par4 = 2 ; par5 = N ; par6 = 0 ; par7 = ; par8 = ;
R code (references can be found in the software module):
library(MASS)
library(msm)
par1 <- sub(',','.',par1)
par2 <- sub(',','.',par2)
par3 <- sub(',','.',par3)
par4 <- sub(',','.',par4)
par1 <- as.numeric(par1)
if (par1 > 10000) par1=10000 #impose restriction on number of random values
par2 <- as.numeric(par2)
par3 <- as.numeric(par3)
par4 <- as.numeric(par4)
if (par6 == '0') par6 = 'Sturges' else {
par6 <- as.numeric(par6)
if (par6 > 50) par6 = 50 #impose restriction on the number of bins
}
if (par7 == '') par7 <- -Inf else par7 <- as.numeric(par7)
if (par8 == '') par8 <- Inf else par8 <- as.numeric(par8)
x <- rtnorm(par1,par2,par3,par7,par8)
x <- as.ts(x) #otherwise the fitdistr function does not work properly
if ((par7 == -Inf) & (par8 == Inf)) (r <- fitdistr(x,'normal'))
bitmap(file='test1.png')
myhist<-hist(x,col=par4,breaks=par6,main=main,ylab=ylab,xlab=xlab,freq=F)
if ((par7 == -Inf) & (par8 == Inf)) {
curve(1/(r$estimate[2]*sqrt(2*pi))*exp(-1/2*((x-r$estimate[1])/r$estimate[2])^2),min(x),max(x),add=T)
}
dev.off()
load(file='createtable')
if (par5 == 'Y')
{
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Index',1,TRUE)
a<-table.element(a,'Value',1,TRUE)
a<-table.row.end(a)
for (i in 1:par1)
{
a<-table.row.start(a)
a<-table.element(a,i,header=TRUE)
a<-table.element(a,x[i])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable1.tab')
}
if ((par7 == -Inf) & (par8 == Inf)) {
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Parameter',1,TRUE)
a<-table.element(a,'Value',1,TRUE)
a<-table.element(a,'Standard Deviation',1,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'# simulated values',header=TRUE)
a<-table.element(a,par1)
a<-table.element(a,'-')
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'true mean',header=TRUE)
a<-table.element(a,par2)
a<-table.element(a,'-')
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'true standard deviation',header=TRUE)
a<-table.element(a,par3)
a<-table.element(a,'-')
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'mean',header=TRUE)
a<-table.element(a,r$estimate[1])
a<-table.element(a,r$sd[1])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'standard deviation',header=TRUE)
a<-table.element(a,r$estimate[2])
a<-table.element(a,r$sd[2])
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable.tab')
}
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Frequency Table (Histogram)',6,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Bins',header=TRUE)
a<-table.element(a,'Midpoint',header=TRUE)
a<-table.element(a,'Abs. Frequency',header=TRUE)
a<-table.element(a,'Rel. Frequency',header=TRUE)
a<-table.element(a,'Cumul. Rel. Freq.',header=TRUE)
a<-table.element(a,'Density',header=TRUE)
a<-table.row.end(a)
crf <- 0
mynumrows <- (length(myhist$breaks)-1)
for (i in 1:mynumrows) {
a<-table.row.start(a)
dum <- paste('[',myhist$breaks[i],sep='')
dum <- paste(dum,myhist$breaks[i+1],sep=',')
if (i==mynumrows)
dum <- paste(dum,']',sep='')
else
dum <- paste(dum,'[',sep='')
a<-table.element(a,dum,header=TRUE)
a<-table.element(a,myhist$mids[i])
a<-table.element(a,myhist$counts[i])
rf <- myhist$counts[i]/par1
crf <- crf + rf
a<-table.element(a,round(rf,6))
a<-table.element(a,round(crf,6))
a<-table.element(a,round(myhist$density[i],6))
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable3.tab')