Practical Computing Exercise for Week 6: Apple Blemishes

Download the template R markdown file for this workshop.

Aims of this practical exercise

In this exercise you will:

  • fit logistic regression models using glm().
  • understand the parameter estimates

The exercise

In an experiment to judge the effect of background colour on a grader’s assessment of whether an apple is blemished, 400 blemished apples were randomly divided into four groups of 100, and mixed with another 100 unblemished ones. Each group of 200 apples were then assessed against a different background. Results for the correctly identified blemished apples are shown in the table below. Test the hypothesis that background colour has no effect on the proportion correctly graded blemished, using the methods of GLM. Also show how the parameter estimates given by R relate to the proportions in the table.

Background colour Black Blue Green White
% classified as blemished 71 79 80 71

Solutions

You should compare your work with the solutions for this workshop.