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 computationTue, 29 Jan 2019 11:19:25 +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/2019/Jan/29/t1548757199dx57h1ogc1qmqtn.htm/, Retrieved Mon, 29 Apr 2024 01:21:15 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=316993, Retrieved Mon, 29 Apr 2024 01:21:15 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact128
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [Random Number Generator - Normal Distribution] [] [2019-01-29 10:19:25] [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 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=316993&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=316993&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=316993&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







Frequency Table (Histogram)
BinsMidpointAbs. FrequencyRel. FrequencyCumul. Rel. Freq.Density
[1497,1497.5[1497.2540.0126980.0126980.025397
[1497.5,1498[1497.7520.0063490.0190480.012698
[1498,1498.5[1498.25120.0380950.0571430.07619
[1498.5,1499[1498.75280.0888890.1460320.177778
[1499,1499.5[1499.25520.1650790.3111110.330159
[1499.5,1500[1499.75630.20.5111110.4
[1500,1500.5[1500.25550.1746030.6857140.349206
[1500.5,1501[1500.75490.1555560.841270.311111
[1501,1501.5[1501.25270.0857140.9269840.171429
[1501.5,1502[1501.75140.0444440.9714290.088889
[1502,1502.5]1502.2590.02857110.057143

\begin{tabular}{lllllllll}
\hline
Frequency Table (Histogram) \tabularnewline
Bins & Midpoint & Abs. Frequency & Rel. Frequency & Cumul. Rel. Freq. & Density \tabularnewline
[1497,1497.5[ & 1497.25 & 4 & 0.012698 & 0.012698 & 0.025397 \tabularnewline
[1497.5,1498[ & 1497.75 & 2 & 0.006349 & 0.019048 & 0.012698 \tabularnewline
[1498,1498.5[ & 1498.25 & 12 & 0.038095 & 0.057143 & 0.07619 \tabularnewline
[1498.5,1499[ & 1498.75 & 28 & 0.088889 & 0.146032 & 0.177778 \tabularnewline
[1499,1499.5[ & 1499.25 & 52 & 0.165079 & 0.311111 & 0.330159 \tabularnewline
[1499.5,1500[ & 1499.75 & 63 & 0.2 & 0.511111 & 0.4 \tabularnewline
[1500,1500.5[ & 1500.25 & 55 & 0.174603 & 0.685714 & 0.349206 \tabularnewline
[1500.5,1501[ & 1500.75 & 49 & 0.155556 & 0.84127 & 0.311111 \tabularnewline
[1501,1501.5[ & 1501.25 & 27 & 0.085714 & 0.926984 & 0.171429 \tabularnewline
[1501.5,1502[ & 1501.75 & 14 & 0.044444 & 0.971429 & 0.088889 \tabularnewline
[1502,1502.5] & 1502.25 & 9 & 0.028571 & 1 & 0.057143 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=316993&T=1

[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][1497,1497.5[[/C][C]1497.25[/C][C]4[/C][C]0.012698[/C][C]0.012698[/C][C]0.025397[/C][/ROW]
[ROW][C][1497.5,1498[[/C][C]1497.75[/C][C]2[/C][C]0.006349[/C][C]0.019048[/C][C]0.012698[/C][/ROW]
[ROW][C][1498,1498.5[[/C][C]1498.25[/C][C]12[/C][C]0.038095[/C][C]0.057143[/C][C]0.07619[/C][/ROW]
[ROW][C][1498.5,1499[[/C][C]1498.75[/C][C]28[/C][C]0.088889[/C][C]0.146032[/C][C]0.177778[/C][/ROW]
[ROW][C][1499,1499.5[[/C][C]1499.25[/C][C]52[/C][C]0.165079[/C][C]0.311111[/C][C]0.330159[/C][/ROW]
[ROW][C][1499.5,1500[[/C][C]1499.75[/C][C]63[/C][C]0.2[/C][C]0.511111[/C][C]0.4[/C][/ROW]
[ROW][C][1500,1500.5[[/C][C]1500.25[/C][C]55[/C][C]0.174603[/C][C]0.685714[/C][C]0.349206[/C][/ROW]
[ROW][C][1500.5,1501[[/C][C]1500.75[/C][C]49[/C][C]0.155556[/C][C]0.84127[/C][C]0.311111[/C][/ROW]
[ROW][C][1501,1501.5[[/C][C]1501.25[/C][C]27[/C][C]0.085714[/C][C]0.926984[/C][C]0.171429[/C][/ROW]
[ROW][C][1501.5,1502[[/C][C]1501.75[/C][C]14[/C][C]0.044444[/C][C]0.971429[/C][C]0.088889[/C][/ROW]
[ROW][C][1502,1502.5][/C][C]1502.25[/C][C]9[/C][C]0.028571[/C][C]1[/C][C]0.057143[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=316993&T=1

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

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
[1497,1497.5[1497.2540.0126980.0126980.025397
[1497.5,1498[1497.7520.0063490.0190480.012698
[1498,1498.5[1498.25120.0380950.0571430.07619
[1498.5,1499[1498.75280.0888890.1460320.177778
[1499,1499.5[1499.25520.1650790.3111110.330159
[1499.5,1500[1499.75630.20.5111110.4
[1500,1500.5[1500.25550.1746030.6857140.349206
[1500.5,1501[1500.75490.1555560.841270.311111
[1501,1501.5[1501.25270.0857140.9269840.171429
[1501.5,1502[1501.75140.0444440.9714290.088889
[1502,1502.5]1502.2590.02857110.057143



Parameters (Session):
par1 = 315 ; par2 = 1500 ; par3 = 1 ; par4 = 2 ; par5 = N ; par6 = 0 ; par7 = 1490 ; par8 = 1510 ;
Parameters (R input):
par1 = 315 ; par2 = 1500 ; par3 = 1 ; par4 = 2 ; par5 = N ; par6 = 0 ; par7 = 1490 ; par8 = 1510 ;
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')