Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_rngnorm.wasp
Title produced by softwareRandom Number Generator - Normal Distribution
Date of computationMon, 12 Nov 2018 02:15:27 +0100
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2018/Nov/12/t1541985606hnl3xmlh9qjpl46.htm/, Retrieved Sat, 27 Apr 2024 21:50:32 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=315633, Retrieved Sat, 27 Apr 2024 21:50:32 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact110
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [Random Number Generator - Normal Distribution] [Graduates] [2018-11-12 01:15:27] [d41d8cd98f00b204e9800998ecf8427e] [Current]
Feedback Forum

Post a new message




Summary of computational transaction
Raw Input view raw input (R code)
Raw Outputview raw output of R engine
Computing time2 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 time2 seconds \tabularnewline
R ServerBig Analytics Cloud Computing Center \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=315633&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]2 seconds[/C][/ROW] [ROW]R Server[/C]Big Analytics Cloud Computing Center[/C][/ROW] [/TABLE] Source: https://freestatistics.org/blog/index.php?pk=315633&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=315633&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 time2 seconds
R ServerBig Analytics Cloud Computing Center







ParameterValueStandard Deviation
# simulated values135-
true mean3572-
true standard deviation1501-
mean3510.16362572194136.465923172457
standard deviation1585.5907433152496.4959796761267

\begin{tabular}{lllllllll}
\hline
Parameter & Value & Standard Deviation \tabularnewline
# simulated values & 135 & - \tabularnewline
true mean & 3572 & - \tabularnewline
true standard deviation & 1501 & - \tabularnewline
mean & 3510.16362572194 & 136.465923172457 \tabularnewline
standard deviation & 1585.59074331524 & 96.4959796761267 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=315633&T=1

[TABLE]
[ROW][C]Parameter[/C][C]Value[/C][C]Standard Deviation[/C][/ROW]
[ROW][C]# simulated values[/C][C]135[/C][C]-[/C][/ROW]
[ROW][C]true mean[/C][C]3572[/C][C]-[/C][/ROW]
[ROW][C]true standard deviation[/C][C]1501[/C][C]-[/C][/ROW]
[ROW][C]mean[/C][C]3510.16362572194[/C][C]136.465923172457[/C][/ROW]
[ROW][C]standard deviation[/C][C]1585.59074331524[/C][C]96.4959796761267[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=315633&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=315633&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 values135-
true mean3572-
true standard deviation1501-
mean3510.16362572194136.465923172457
standard deviation1585.5907433152496.4959796761267







Frequency Table (Histogram)
BinsMidpointAbs. FrequencyRel. FrequencyCumul. Rel. Freq.Density
[-1000,0[-50040.029630.029633e-05
[0,1000[50050.0370370.0666673.7e-05
[1000,2000[1500120.0888890.1555568.9e-05
[2000,3000[2500280.2074070.3629630.000207
[3000,4000[3500370.2740740.6370370.000274
[4000,5000[4500250.1851850.8222220.000185
[5000,6000[5500180.1333330.9555560.000133
[6000,7000[650040.029630.9851853e-05
[7000,8000[750010.0074070.9925937e-06
[8000,9000]850010.00740717e-06

\begin{tabular}{lllllllll}
\hline
Frequency Table (Histogram) \tabularnewline
Bins & Midpoint & Abs. Frequency & Rel. Frequency & Cumul. Rel. Freq. & Density \tabularnewline
[-1000,0[ & -500 & 4 & 0.02963 & 0.02963 & 3e-05 \tabularnewline
[0,1000[ & 500 & 5 & 0.037037 & 0.066667 & 3.7e-05 \tabularnewline
[1000,2000[ & 1500 & 12 & 0.088889 & 0.155556 & 8.9e-05 \tabularnewline
[2000,3000[ & 2500 & 28 & 0.207407 & 0.362963 & 0.000207 \tabularnewline
[3000,4000[ & 3500 & 37 & 0.274074 & 0.637037 & 0.000274 \tabularnewline
[4000,5000[ & 4500 & 25 & 0.185185 & 0.822222 & 0.000185 \tabularnewline
[5000,6000[ & 5500 & 18 & 0.133333 & 0.955556 & 0.000133 \tabularnewline
[6000,7000[ & 6500 & 4 & 0.02963 & 0.985185 & 3e-05 \tabularnewline
[7000,8000[ & 7500 & 1 & 0.007407 & 0.992593 & 7e-06 \tabularnewline
[8000,9000] & 8500 & 1 & 0.007407 & 1 & 7e-06 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=315633&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][-1000,0[[/C][C]-500[/C][C]4[/C][C]0.02963[/C][C]0.02963[/C][C]3e-05[/C][/ROW]
[ROW][C][0,1000[[/C][C]500[/C][C]5[/C][C]0.037037[/C][C]0.066667[/C][C]3.7e-05[/C][/ROW]
[ROW][C][1000,2000[[/C][C]1500[/C][C]12[/C][C]0.088889[/C][C]0.155556[/C][C]8.9e-05[/C][/ROW]
[ROW][C][2000,3000[[/C][C]2500[/C][C]28[/C][C]0.207407[/C][C]0.362963[/C][C]0.000207[/C][/ROW]
[ROW][C][3000,4000[[/C][C]3500[/C][C]37[/C][C]0.274074[/C][C]0.637037[/C][C]0.000274[/C][/ROW]
[ROW][C][4000,5000[[/C][C]4500[/C][C]25[/C][C]0.185185[/C][C]0.822222[/C][C]0.000185[/C][/ROW]
[ROW][C][5000,6000[[/C][C]5500[/C][C]18[/C][C]0.133333[/C][C]0.955556[/C][C]0.000133[/C][/ROW]
[ROW][C][6000,7000[[/C][C]6500[/C][C]4[/C][C]0.02963[/C][C]0.985185[/C][C]3e-05[/C][/ROW]
[ROW][C][7000,8000[[/C][C]7500[/C][C]1[/C][C]0.007407[/C][C]0.992593[/C][C]7e-06[/C][/ROW]
[ROW][C][8000,9000][/C][C]8500[/C][C]1[/C][C]0.007407[/C][C]1[/C][C]7e-06[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=315633&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=315633&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
[-1000,0[-50040.029630.029633e-05
[0,1000[50050.0370370.0666673.7e-05
[1000,2000[1500120.0888890.1555568.9e-05
[2000,3000[2500280.2074070.3629630.000207
[3000,4000[3500370.2740740.6370370.000274
[4000,5000[4500250.1851850.8222220.000185
[5000,6000[5500180.1333330.9555560.000133
[6000,7000[650040.029630.9851853e-05
[7000,8000[750010.0074070.9925937e-06
[8000,9000]850010.00740717e-06



Parameters (Session):
par1 = 135 ; par2 = 3572 ; par3 = 1501 ; par4 = 2 ; par5 = N ; par6 = 10 ;
Parameters (R input):
par1 = 135 ; par2 = 3572 ; par3 = 1501 ; par4 = 2 ; par5 = N ; par6 = 10 ; 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')