::Free Statistics and Forecasting Software::

v1.1.23-r6
 
  Black&White | Blue Theme | Normal Fontsize | Increase Fontsize | Decrease Fontsize | Toggle underline
Secure website (SSL) | Private
 
 


This software module is powered by R

:: MC Mock_Exam - Q1 ::

All rights reserved. The non-commercial (academic) use of this software is free of charge. The only thing that is asked in return is to cite this software when results are used in publications.

Click here to edit the underlying code of this R Module.

Student ID 
Chart options
Width:
Height:

Click here to edit the underlying code of this R Module.




Click here to edit the underlying code of this R Module.









Source code of R module
1library(digest)
2myran <- runif(1)
3if (myran <= 1) {
4nx1 <- rnorm(100)
5nx2 <- rnorm(100, sd=2.0, mean=0.0)
6nx3 <- rnorm(100, sd=2.0, mean=-2.0)
7answer <- "nx1"
8}
9if (myran < 0.66) {
10nx2 <- rnorm(100)
11nx3 <- rnorm(100, sd=2.0, mean=0.0)
12nx1 <- rnorm(100, sd=2.0, mean=-2.0)
13answer <- "nx2"
14}
15if (myran < 0.33) {
16nx3 <- rnorm(100)
17nx1 <- rnorm(100, sd=2.0, mean=0.0)
18nx2 <- rnorm(100, sd=2.0, mean=-2.0)
19answer <- "nx3"
20}
21answer <- digest(answer,ser=F)
22allmeans<- c(mean(nx1),mean(nx2),mean(nx3))
23names(allmeans)<-c("Sample 1", "Sample 2", "Sample 3")
24allmeans
25allsd<- c(sd(nx1), sd(nx2), sd(nx3))
26names(allsd)<- c("Sample 1", "Sample 2", "Sample 3")
27allsd
28load(file="createtable")
29a<-table.start()
30a<-table.row.start(a)
31a<-table.element(a,"Identify the sample most similar to a standard normal distribution.",1,TRUE)
32a<-table.row.end(a)
33a<-table.row.start(a)
34a<-table.element(a,hyperlink(paste("http://www.wessa.net/Ian.Holliday/rwasp_May_mock2.wasp?par1=",par1,"&par2=nx1&par3=",answer,"&par0=1",sep=""),"The sample called nx1","",target=""))
35a<-table.row.end(a)
36a<-table.row.start(a)
37a<-table.element(a,hyperlink(paste("http://www.wessa.net/Ian.Holliday/rwasp_May_mock2.wasp?par1=",par1,"&par2=nx2&par3=",answer,"&par0=1",sep=""),"The sample called nx2","",target=""))
38a<-table.row.end(a)
39a<-table.row.start(a)
40a<-table.element(a,hyperlink(paste("http://www.wessa.net/Ian.Holliday/rwasp_May_mock2.wasp?par1=",par1,"&par2=nx3&par3=",answer,"&par0=1",sep=""),"The sample called nx3","",target=""))
41a<-table.row.end(a)
42a<-table.row.start(a)
43a<-table.element(a,hyperlink(paste("http://www.wessa.net/Ian.Holliday/rwasp_May_mock2.wasp?par1=",par1,"&par2=wnga&par3=",answer,"&par0=1",sep=""),"Avoid Guessing Penalty","",target=""))
44a<-table.row.end(a)
45a<-table.end(a)
46table.save(a,file="mytable1.tab")
47a<-table.start()
48a<-table.row.start(a)
49a<-table.element(a,"Means of the three samples",4,TRUE)
50a<-table.row.end(a)
51a<-table.row.start(a)
52a<-table.element(a,"Sample",1,TRUE)
53a<-table.element(a,"nx1",1,TRUE)
54a<-table.element(a,"nx2",1,TRUE)
55a<-table.element(a,"nx3",1,TRUE)
56a<-table.row.end(a)
57a<-table.row.start(a)
58a<-table.element(a,"Value",1,TRUE)
59a<-table.element(a,round(mean(nx1),3))
60a<-table.element(a,round(mean(nx2),3))
61a<-table.element(a,round(mean(nx3),3))
62a<-table.row.end(a)
63a<-table.end(a)
64table.save(a,file="mytable2.tab")
65a<-table.start()
66a<-table.row.start(a)
67a<-table.element(a,"Standard deviations of the three samples",4,TRUE)
68a<-table.row.end(a)
69a<-table.row.start(a)
70a<-table.element(a,"Sample",1,TRUE)
71a<-table.element(a,"nx1",1,TRUE)
72a<-table.element(a,"nx2",1,TRUE)
73a<-table.element(a,"nx3",1,TRUE)
74a<-table.row.end(a)
75a<-table.row.start(a)
76a<-table.element(a,"Value",1,TRUE)
77a<-table.element(a,round(sd(nx1),3))
78a<-table.element(a,round(sd(nx2),3))
79a<-table.element(a,round(sd(nx3),3))
80a<-table.row.end(a)
81a<-table.end(a)
82table.save(a,file="mytable3.tab")
83bitmap(file="hist1.png")
84hist(nx1)
85dev.off()
86bitmap(file="hist2.png")
87hist(nx2)
88dev.off()
89bitmap(file="hist3.png")
90hist(nx3)
91dev.off()
92bitmap(file="pairs.png")
93pairs(x=cbind(nx1, nx2, nx3))
94dev.off()
Top | Output | Charts | References | History | Feedback



Cite this software as:
I. Holliday, 2010, MC Exam Q1 (v1.0) in Free Statistics Software (v1.1.23-r6), Office for Research Development and Education, URL http://www.wessa.net/Ian.Holliday/rwasp_mcq20101.wasp/
The R code is based on :
Top | Output | Charts | References | History | Feedback
Delete history
Server DateModuleCommand
Thu, 20 Jun 2013 05:51:33 -0400Start of session-
Top | Output | Charts | References | History | Feedback

To cite Wessa.net in publications use:
Wessa, P. (2013), Free Statistics Software, Office for Research Development and Education,
version 1.1.23-r6, URL http://www.wessa.net/

© Resa R&D, and the 'Office for Research, Development, and Education' - All rights reserved. Academic license for non-commercial use only.
This website is an intellectual and physical property of Resa R&D. This includes: html content, graphical illustrations (gif files), computer software, online or electronic documentation, associated media, and printed materials. The free use of the scientific content, services, and applications in this website is granted for non commercial use only. In any case, the source (url) should always be clearly displayed. Under no circumstances are you allowed to reproduce, copy or redistribute the design, layout, or any content of this website (for commercial use) including any materials contained herein without the express written permission of Resa R&D or the Office for Research, Development, and Education.

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, Resa R&D makes no warranties or representations as to the accuracy or completeness of such information (or software), and it assumes 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 Resa R&D 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.

Software Version : 1.1.23-r6
Algorithms & Software : Prof. dr. P. Wessa
Facilities : Resa R&D - Office for Research, Development, and Education
Server : www.wessa.net

Comments, Feedback & Errors | Privacy Policy | Statistics Resources | Wessa.net Home

 © Wessa.Net 2002-2013  
 
 

Home Page
Equation Plotter
Time Series Analysis
Multiple Regression
Descriptive Statistics
Statistical Distributions
Hypothesis Testing
Simon Fraser University
Aston University

Academic citations
Computations Archive
Search Computations
R Project
FAQ
About Wessa.net
Powered by Linux

Server status page
Any R Server
Installed Packages

History list
Edit R Code