Homework 5
due in class, Tuesday February 22
Include only the most relevant parts of output from R (or whatever package you are
using). Do not include a transcript of your entire session, just cut and paste
(electronically or literally) the necessary part
ENGR 113: Lab 5 Simple Linear Regression
Objective: To introduce simple linear regression in R Note that there is a text le of all the R commands on the class web page, so that if you wish, you can cut and paste those in instead of retyping them.
Linear R
Sketch of solutions for HW #3:
1) a) x P(X=x)
b) x P(X=x)
c) x P(X=x)
-1 21/36=7/12
-1 21/36=7/12
-1 30/36=5/6
1 15/36=5/12
1 15/36=5/12
4
6/36=1/6
d) for the first two, E[X] = 1*5/12 -1*7/12 = -2/12 = -1/6
for the third, E[X] = 4*1/6 -1*5/6 = -1/6
2) a)
Sketch of solutions for HW #2:
1) From R:
a) summary(bank1)
Min. 1st Qu. Median
Mean 3rd Qu.
Max.
0.380
3.370
4.500
4.287
5.340
6.460
b) Waiting times are reasonably symmetrically distributed around
4.5 minutes, with one low outlier at 0.38.
c) summary(ba
Homework 2
due in class, Tuesday January 18
You must SHOW ALL WORK for full credit (except for things computed entirely in
R, of course). Please staple your assignment if it is more than one page. Where the
problem asks you to create a graph, you should d
Sketch of solutions for homework #1.
Graphs are not included here.
1.) b) categorical - whether the CEO was required to give approval
c) numerical - budget for the recently completed IS project
d) This was a simple random sample of members of an IS organi
Sketch of solutions for HW #5:
1) null hypothesis: popn mean price of domestic beer = popn mean
price of imported beer
alternative hypothesis: popn means not equal
in R:
beer = read.table("beer.txt")
domestic = beer$V2[beer$V6=1]
import = beer$V2[beer$V6=
Sketch of solutions for HW #6:
1) 13.25 b) The plot of residuals versus fitted values (or versus box office
gross) shows no patterns (although one could argue that there is less
variability for very small box office gross movies), and the normal
probabili
d e pq usq iw yq r(3S)ffU$1qrh xBUrr7md7(qEU`()U1x [email protected] q q g gq q i q i e yi g y pq e p w i yq g y i e hoxSh(hhrWW3fhu [email protected](vh$1w7 q9ho19fvWh qp yn w u q y u i qp ynw yiq q i i wp w u y i rUxUmqrm779qmdrUfkrmmUfmkxp(1qfr978vf`UWq
Homework 1
due in class, Tuesday January 11
You must SHOW ALL WORK for full credit (except for things computed entirely in
R, of course). Please staple your assignment if it is more than one page. Where the
problem asks you to create a graph, you should d
AMS 113: Lab 1
Introduction to R
Lab Objectives
To demonstrate basic operations in R.
Instructions
As you read through, you will see things in typewriter font enclosed in curly braces. You are meant
to actually type in those things (but not the braces the
Sketch of solutions for HW #7:
1) 14.35 a) Y-hat = 1.3 + 0.074*shelfspace + 0.45*frontshelf
b) For a given aisle location, for each additional foot of shelf
space we expect weekly sales to increase by an average of $7.40.
For a given amount of shelf space
Mid-Quarter Review Problems
1. At night, the core shuttle runs every 20 minutes. Assume the amount
of time you have to wait for the next shuttle is exponentially distributed.
What is the probability that the next shuttle arrives in less than 5 minutes?
2.
cereal=read.table("cereal.txt",header=T)
cereal
attach(cereal)
# so we can use variable names
sodium
sort(sodium)
stem(sodium)
stem(sodium,scale=0.5)
stem(sodium,scale=2)
#
#
#
#
ordered array
stem and leaf plot
half as many rows
twice as many rows - this
Homework 6
due in class, Tuesday March 1
You must SHOW ALL WORK for full credit. Include only the most relevant parts of
output from R (or whatever package you are using). Do not include a transcript of
your entire session, just cut and paste (electronica
Homework 3
due in class, Tuesday January 25
You must SHOW ALL WORK for full credit (except for things computed entirely in
R; if you use R for any of these problems, you should clearly say so). Please staple
your assignment if it is more than one page.
Re
Homework 4
due in class, Tuesday February 1
You must SHOW ALL WORK for full credit (except for things computed entirely in
R, of course). Please staple your assignment if it is more than one page.
Required problems:
1) 6.12 parts (a)-(d) (p. 212)
2) The t
b
dhdrTd
dudeWp
dupr#d8
dudeh
i k o cfw_ z t u i y w y t wg ir
AxiuA8vfvgtdYgu5xipAjxAuAuxk
xkyj k W8dvgxeq5eiudg d dAx5duPdYg5uAvxAuA%A5vmxxiA5ux~uxkfu
k y w k b ug icfw_ wiq i y w u im wq o i t y wgi y i y y
spAdufgfeidvgf58AyeAuAA5jkyfxi'c dh
u aIa x C I WQ G V ra C j C I WQ p VIa p c C G F QY V I VDDa QI DICd a
HeH#2deQ#sH2dEeQ2d#daH!HhuXpUeD2P2h#
I F Q ja C ra F Q Y C x c rQ p d C VDI F Q Y p a CD uICD aIa x V I C VGDC
!dfh#bhPh!eCeHEHex2!hE2sUhdHteDHPXjuhat
0
time
50
100
150
200
250
300
0
y oe df
wgespvupt
ww5
5
otuu h
uwV2Fy 5 5f y4
y
o cfw_ s
Vcfw_uytI
icfw_f cfw_ s
ewpI
ee t s y
Vww5D5Qv7w'd zqo |
efcfw_ t to q t f h | qcfw_ u ee t y | s fcfw_ t to dft
gwS45fp4e 5kp'cfw_ 'ye FuEdS5wf5wv7w' zqo rgewSS5dp`p7yi
u soe y | e