16. Lets look at the production of each
dwarf, relative to the time one applied…
Dwarfs which are using the
OLD hammer design
Dwarfs which are using the
NEW hammer design
17. new <- read.csv(file="new_relative.csv")
old <- read.csv(file="old_relative.csv")
!
qplot(new$relative_month, new$production)
ggplot(new, aes(x=relative_month, y=production)) + geom_point(shape=19,
position=position_jitter(width=.5,height=0), alpha=.2)
# This will look much better!
old$type='old'
new$type='new'
old_and_new = rbind(old,new)
ggplot(old_and_new, aes(x=relative_month, y=production, color=type)) + geom_point(shape=19,
position=position_jitter(width=.5,height=0), alpha=.2)
22. old_m = lm(production ~ relative_month, old)
new$possible_production <- predict(old_m, new)
sum(new$possible_production) - sum(new$production)
(sum(new$possible_production) - sum(new$production))/sum(new$production)
0.5%
Now, taking into account the price of
hammer, one can select the optimal
strategy… but that’s another story…
23. Lessons learned …?
• Don’t trust the data blindly, ask questions
• Try to understand underlying rules of the system
• Don’t be shy with trying various models
• If using R, go for ggplot2