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 computationFri, 10 Apr 2020 02:21: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/2020/Apr/10/t1586478183f3ro2w7wdjce3e9.htm/, Retrieved Fri, 07 May 2021 10:44:49 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=319122, Retrieved Fri, 07 May 2021 10:44:49 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact40
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [Random Number Generator - Normal Distribution] [] [2020-04-10 00:21:13] [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=319122&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=319122&T=0

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







Frequency Table (Histogram)
BinsMidpointAbs. FrequencyRel. FrequencyCumul. Rel. Freq.Density
[50,55[52.530.030.030.006
[55,60[57.550.050.080.01
[60,65[62.550.050.130.01
[65,70[67.5110.110.240.022
[70,75[72.5190.190.430.038
[75,80[77.5230.230.660.046
[80,85[82.5190.190.850.038
[85,90[87.5100.10.950.02
[90,95[92.530.030.980.006
[95,100]97.520.0210.004

\begin{tabular}{lllllllll}
\hline
Frequency Table (Histogram) \tabularnewline
Bins & Midpoint & Abs. Frequency & Rel. Frequency & Cumul. Rel. Freq. & Density \tabularnewline
[50,55[ & 52.5 & 3 & 0.03 & 0.03 & 0.006 \tabularnewline
[55,60[ & 57.5 & 5 & 0.05 & 0.08 & 0.01 \tabularnewline
[60,65[ & 62.5 & 5 & 0.05 & 0.13 & 0.01 \tabularnewline
[65,70[ & 67.5 & 11 & 0.11 & 0.24 & 0.022 \tabularnewline
[70,75[ & 72.5 & 19 & 0.19 & 0.43 & 0.038 \tabularnewline
[75,80[ & 77.5 & 23 & 0.23 & 0.66 & 0.046 \tabularnewline
[80,85[ & 82.5 & 19 & 0.19 & 0.85 & 0.038 \tabularnewline
[85,90[ & 87.5 & 10 & 0.1 & 0.95 & 0.02 \tabularnewline
[90,95[ & 92.5 & 3 & 0.03 & 0.98 & 0.006 \tabularnewline
[95,100] & 97.5 & 2 & 0.02 & 1 & 0.004 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=319122&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][50,55[[/C][C]52.5[/C][C]3[/C][C]0.03[/C][C]0.03[/C][C]0.006[/C][/ROW]
[ROW][C][55,60[[/C][C]57.5[/C][C]5[/C][C]0.05[/C][C]0.08[/C][C]0.01[/C][/ROW]
[ROW][C][60,65[[/C][C]62.5[/C][C]5[/C][C]0.05[/C][C]0.13[/C][C]0.01[/C][/ROW]
[ROW][C][65,70[[/C][C]67.5[/C][C]11[/C][C]0.11[/C][C]0.24[/C][C]0.022[/C][/ROW]
[ROW][C][70,75[[/C][C]72.5[/C][C]19[/C][C]0.19[/C][C]0.43[/C][C]0.038[/C][/ROW]
[ROW][C][75,80[[/C][C]77.5[/C][C]23[/C][C]0.23[/C][C]0.66[/C][C]0.046[/C][/ROW]
[ROW][C][80,85[[/C][C]82.5[/C][C]19[/C][C]0.19[/C][C]0.85[/C][C]0.038[/C][/ROW]
[ROW][C][85,90[[/C][C]87.5[/C][C]10[/C][C]0.1[/C][C]0.95[/C][C]0.02[/C][/ROW]
[ROW][C][90,95[[/C][C]92.5[/C][C]3[/C][C]0.03[/C][C]0.98[/C][C]0.006[/C][/ROW]
[ROW][C][95,100][/C][C]97.5[/C][C]2[/C][C]0.02[/C][C]1[/C][C]0.004[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=319122&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=319122&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
[50,55[52.530.030.030.006
[55,60[57.550.050.080.01
[60,65[62.550.050.130.01
[65,70[67.5110.110.240.022
[70,75[72.5190.190.430.038
[75,80[77.5230.230.660.046
[80,85[82.5190.190.850.038
[85,90[87.5100.10.950.02
[90,95[92.530.030.980.006
[95,100]97.520.0210.004



Parameters (Session):
par1 = 100 ; par2 = 75 ; par3 = 10 ; par4 = 2 ; par5 = N ; par6 = 0 ; par7 = 50 ; par8 = 100 ;
Parameters (R input):
par1 = 100 ; par2 = 75 ; par3 = 10 ; par4 = 2 ; par5 = N ; par6 = 0 ; par7 = 50 ; par8 = 100 ;
R code (references can be found in the software module):
par8 <- '100'
par7 <- '50'
par6 <- '0'
par5 <- 'N'
par4 <- '2'
par3 <- '10'
par2 <- '75'
par1 <- '100'
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')