Randomized Block Design
In a randomized block design, there is only one primary factor under consideration in the experiment. Similar test subjects are grouped into blocks. Each block is tested against all treatment levels of the primary factor at random order. This is intended to eliminate possible influence by other extraneous factors.
Example
A fast food franchise is test marketing 3 new menu items. To find out if they have the same popularity, 6 franchisee restaurants are randomly chosen for participation in the study. In accordance with the randomized block design, each restaurant will be test marketing all 3 new menu items. Furthermore, a restaurant will test market only one menu item per week, and it takes 3 weeks to test market all menu items. The testing order of the menu items for each restaurant is randomly assigned as well.
Problem
Suppose each row in the following table represents the sales figures of the 3 new menu in a restaurant after a week of test marketing. At .05 level of significance, test whether the mean sales volume for the 3 new menu items are all equal.
Solution
The solution consists of the following steps:
- Copy and paste the sales figure above into a table file named "fastfood-2.txt" with a text editor.
- Load the file into a data frame named df2 with the read.table function. As the first line in the file contains the column names, we set the header argument as TRUE.
- Concatenate the data rows in df2 into a single vector r .
- Assign new variables for the treatment levels and number of control blocks.
- Create a vector of treatment factors that corresponds to the each element in r of step 3 with the gl function.
- Similarly, create a vector of blocking factors for each element in the response data r.
- Apply the function aov to a formula that describes the response r by both the treatment factor tm and the block control blk.
- Print out the ANOVA table with the summary function.
Answer
Since the p-value of 0.032 is less than the .05 significance level, we reject the null hypothesis that the mean sales volume of the new menu items are all equal.
Exercise
Create the response data in step 3 above along vertical columns instead of horizontal rows. Adjust the factor levels in steps 5 and 6 accordingly.