assignments
due Wed Feb 13
Assignment 1
- Find the mean, median, variance and standard deviation of the valuse for cookie A "by hand" (you can use a calculator but not software that automate these).
- From Coll Stats: 1.12.8, 1.12.17.
- From OpenIntro Stats: 1.9.1 1.1.
- Give numerical summaries of some data using R. Two suggested data sets: the inbuilt one called "iris" (type head(iris) into R to get a start on what's there). I've attached the oil data to the resources page as oil2011.csv. The goal here is to play with R and explore some of the tools. Try stuff out and see what happens.
due Wed Feb 20
Assignment 2
- Criticise one or more graphs. Work along similar lines to the way we discussed graphs in class on Tuesday. In particular, you should at a minimum point out at least one thing that a graph does well (and why doing it that way is doing it well) and at least one thing that a graph does badly (and how it could have done it better). Several points along these lines along with some discussion of what the graph accomplishes and so on is ideal.
- Play with drawing graphs using R and ggplot2. The files and data sets we looked at in class on Thursday are on the resources page. The built in iris set from last week's homework is another good one to work with. Remember, you should not be planning to write code from scratch; take examples, whether mine or from elsewhere, and adapt them to your needs.
- Do something cool with R. Browse the web and find one of the many places that gives examples of what R can do and recreate it, possibly with some adaptation if appropriate. R-bloggers, linked from the resources page, is a good place to start looking.
(When I said in class there were two questions I forgot about that third one I wanted to ask. Sorry about that.)
due Mon Mar 11
Assignment 3
- From OpenIntro Stats: 2.6.1 2.3, 2.6.2 2.17, 3.6.1 3.2, 3.6.1 3.10.
- From Collaborative Stats: 4.15.20 (p.188).
- Normal Pig is played similarly to Pig, but uses the normal distribution with a mean of 1.5 and a standard deviation of 1 instead of a die. One "roll" can be made by typing rnorm(1, 1.5) into R. (actually round(rnorm(1,1.5, 2)) might be better, to limit the rolls to 2dp). If you roll a negative number then you lose the points accumulated this turn. Positive numbers add to the score in the same way that rolls of 2-6 do in pig. What's the best strategy?
- Attempt at least one of the following. These are hard and open-ended; I'm mostly looking for you to get stuck into them and learn something from the process, so document this in your submission. In each case you've seen the material to get started but probably not everything you need.
- Calculate the probabilities of the poker hands. Are they ordered as you'd expect? What about variant games (wild cards, Texas hold'em,...).
- Design and analyse a Pig-like game, building on what we've done in this vein in class.
- Play with R. Learn some new skills and tricks and practise the ones we've been using in class.
- (Note that the pig-related R file from class is available from the resources page.)
due Thu Mar 14
Quiz 1
As discussed in class, the quiz will be 40mins, closed book, and test the basics of what we've seen so far in the course.
due Fri Apr 19
Assignment 4
- From OpenIntro Stats: 4.6, 4.30, 4.39, 5.2, 5.4, 5.30
- Here are R specifications for five dice of different colours:
red<-c(4,4,4,4,4,9)
blue<-c(2,2,2,7,7,7)
olive<-c(0,5,5,5,5,5)
yellow<-c(3,3,3,3,8,8)
magenta<-c(1,1,6,6,6,6)
Which one is best in one-on-one roll-offs where the winner is the one who rolls the higher number? Can you generalise to other problems? (What if two dice against two other dice? How fair do the dice need to be for your results to be true? (Phrased differently, how loaded do you need to make the dice to win a game that you would lose with fair dice?) Etc.) You have the tools to approach this theoretically or to examine the situation with R. Either or both is good. There is an R file called weirddice.r attached to the resources page that has some R code to get you started (it'll let you roll a pair of dice any number of times and tell you the number of times one wins).
- Report on your dice rolling from last week. Give a confidence interval for the true probability that the dice in your jar roll a 6 (including stating all the pieces a reader needs to understand what you are saying).
due Thu May 9
Quiz 2
Optional second quiz. As we agreed in class, your single best quiz score from the two will count, rather than the best two from three as the syllabus says.
due Fri May 10
Assignment 5
- From OpenIntro Stats: 6.44 (use R to confirm the value of chi-squared given and find the p-value), 7.18, 7.28
- Find some data appropriate to a linear regression. Plot it and perform the analysis.
due Fri May 10
Project
due Sun May 12
Final Exam
due Wed May 15
Overall Grade