Home » date » 2010 » Nov » 30 »

*The author of this computation has been verified*
R Software Module: /rwasp_rngnorm.wasp (opens new window with default values)
Title produced by software: Random Number Generator - Normal Distribution
Date of computation: Tue, 30 Nov 2010 14:54:51 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Nov/30/t1291128817lrezuh9uyjmssmz.htm/, Retrieved Tue, 30 Nov 2010 15:53:37 +0100
 
BibTeX entries for LaTeX users:
@Manual{KEY,
    author = {{YOUR NAME}},
    publisher = {Office for Research Development and Education},
    title = {Statistical Computations at FreeStatistics.org, URL http://www.freestatistics.org/blog/date/2010/Nov/30/t1291128817lrezuh9uyjmssmz.htm/},
    year = {2010},
}
@Manual{R,
    title = {R: A Language and Environment for Statistical Computing},
    author = {{R Development Core Team}},
    organization = {R Foundation for Statistical Computing},
    address = {Vienna, Austria},
    year = {2010},
    note = {{ISBN} 3-900051-07-0},
    url = {http://www.R-project.org},
}
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
 
Output produced by software:

Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24


IndexValue
148.2392549560449
253.837064586348
351.6238309914777
446.1333131088424
547.4197188496871
648.9275931063308
750.1214222478625
854.037572079239
949.2379028836373
1049.6587280563695
1148.4209125291962
1250.9331740235283
1351.41008653048
1448.0501905559205
1551.0499973237719
1649.5349244105559
1751.7576588097382
1850.8203234743411
1949.5776453900678
2048.9784275788861
2153.0369043030698
2254.1725141921692
2349.24736168712
2449.9635760919766
2550.1527184131898
2650.0609696801147
2751.0070821637766
2852.2060560176803
2951.3947237806226
3050.6670450563874
3148.8079208889854
3245.807216775075
3350.5904270813237
3452.0727917546069
3544.8678930739973
3650.4837821156126
3751.4117516628565
3850.4134956298284
3949.0559776235277
4049.1206518589337
4148.3707058042138
4250.8704214377078
4352.707978487082
4449.0157880179344
4545.4936213201909
4652.6769089205453
4750.0869659281943
4850.28537512186
4950.9174121640063
5050.9991919489938
5149.1029261684711
5250.7961321667183
5352.9357272015454
5449.2423024681831
5548.7653299810191
5646.8351842404378
5750.2701599984083
5847.8158020034829
5950.6382390533312
6050.5360906978867
6151.1356302066408
6250.0409111927449
6348.2816255087708
6455.324854688103
6550.9857616306004
6646.6627511042843
6752.7878873599803
6846.5523734707578
6951.0958210443425
7053.8337631982032
7149.4731774440849
7248.0604072629601
7350.6679458089009
7448.1979399436173
7551.3870257220759
7652.3947954481883
7749.0709723364933
7850.9103056289035
7946.9009554262698
8054.192891747397
8152.1839745652236
8249.0984401661628
8348.9085289104062
8453.5152591376814
8548.0911044825679
8649.9521838882341
8750.0973384591491
8850.5700915782997
8951.0193772449741
9052.532109935325
9147.7817529171522
9246.5744136637153
9350.7389985446357
9451.5265923188601
9550.7898657262774
9651.8154563835626
9749.0738253515252
9849.8415483093543
9950.9034124302399
10049.1693656215045
10149.9656476718117
10252.0837507441577
10350.3837036955452
10450.2500294362288
10551.7940913656031
10649.3414872778236
10750.4002941246755
10849.6389854266126
10952.6593520099916
11046.0335279643669
11150.9123477705038
11249.0620820304763
11352.6608320676148
11449.9800000201337
11552.2600844140151
11649.6881258087167
11748.7407635910405
11849.8068744137787
11947.7604299326978
12051.0044659470059


ParameterValueStandard Deviation
# simulated values120-
true mean50-
true standard deviation2-
mean50.16034313328640.179671541253616
standard deviation1.968203121726510.12704696520667
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/30/t1291128817lrezuh9uyjmssmz/1gopc1291128887.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t1291128817lrezuh9uyjmssmz/1gopc1291128887.ps (open in new window)


 
Parameters (Session):
par1 = 120 ; par2 = 50 ; par3 = 2 ; par4 = 1 ; par5 = Y ; par6 = 0 ;
 
Parameters (R input):
par1 = 120 ; par2 = 50 ; par3 = 2 ; par4 = 1 ; par5 = Y ; par6 = 0 ;
 
R code (references can be found in the software module):
library(MASS)
library(msm)
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')
}
 





Copyright

Creative Commons License

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 License.

Software written by Ed van Stee & Patrick Wessa


Disclaimer

Information provided on this web site is provided "AS IS" without warranty of any kind, either express or implied, including, without limitation, warranties of merchantability, fitness for a particular purpose, and noninfringement. We use reasonable efforts to include accurate and timely information and periodically update the information, and software without notice. However, we make no warranties or representations as to the accuracy or completeness of such information (or software), and we assume no liability or responsibility for errors or omissions in the content of this web site, or any software bugs in online applications. Your use of this web site is AT YOUR OWN RISK. Under no circumstances and under no legal theory shall we be liable to you or any other person for any direct, indirect, special, incidental, exemplary, or consequential damages arising from your access to, or use of, this web site.


Privacy Policy

We may request personal information to be submitted to our servers in order to be able to:

  • personalize online software applications according to your needs
  • enforce strict security rules with respect to the data that you upload (e.g. statistical data)
  • manage user sessions of online applications
  • alert you about important changes or upgrades in resources or applications

We NEVER allow other companies to directly offer registered users information about their products and services. Banner references and hyperlinks of third parties NEVER contain any personal data of the visitor.

We do NOT sell, nor transmit by any means, personal information, nor statistical data series uploaded by you to third parties.

We carefully protect your data from loss, misuse, alteration, and destruction. However, at any time, and under any circumstance you are solely responsible for managing your passwords, and keeping them secret.

We store a unique ANONYMOUS USER ID in the form of a small 'Cookie' on your computer. This allows us to track your progress when using this website which is necessary to create state-dependent features. The cookie is used for NO OTHER PURPOSE. At any time you may opt to disallow cookies from this website - this will not affect other features of this website.

We examine cookies that are used by third-parties (banner and online ads) very closely: abuse from third-parties automatically results in termination of the advertising contract without refund. We have very good reason to believe that the cookies that are produced by third parties (banner ads) do NOT cause any privacy or security risk.

FreeStatistics.org is safe. There is no need to download any software to use the applications and services contained in this website. Hence, your system's security is not compromised by their use, and your personal data - other than data you submit in the account application form, and the user-agent information that is transmitted by your browser - is never transmitted to our servers.

As a general rule, we do not log on-line behavior of individuals (other than normal logging of webserver 'hits'). However, in cases of abuse, hacking, unauthorized access, Denial of Service attacks, illegal copying, hotlinking, non-compliance with international webstandards (such as robots.txt), or any other harmful behavior, our system engineers are empowered to log, track, identify, publish, and ban misbehaving individuals - even if this leads to ban entire blocks of IP addresses, or disclosing user's identity.


FreeStatistics.org is powered by