Assignment Two: Quiz on Friday Jan. 25th

This assignment was revised on Friday Jan. 18th. See note at the bottom. Everything else is the same.

This assignment is based on Chapter Two and associated lecture material. Most of Chapter 2 should be helpful, except that it gives more details than you need to know about the output from the t-test procedure. You are not responsible for those details.

The Furnace Data

Wisconsin Power and Light studied the effectiveness of two devices for improving the efficiency of gas home-heating systems. The electric vent damper (EVD) reduces heat loss through the chimney when the furnace is in the off cycle by closing off the vent. It is controlled electrically. The thermally activated vent damper (TVD) is the same as the EVD except that it is controlled by the thermal properties of a set of bimetal fins set in the vent. Ninety test houses were used, 40 with TVDs and 50 with EVDs. For each house, energy consumption was measured for a period of several weeks with the vent damper active ("vent damper in") and for an equal period with the vent damper not active ("vent damper out").

The variables are:

    Type of furnace (1=Forced air  2=Gravity  3=Forced water)
    Chimney area
    Chimney shape (1=Round  2=Square  3=Rectangular)
    Chimney height in feet
    Type of Chimney liner (0=Unlined  1=Tile  2=Metal)
    Type of house (1=Ranch  2=Two-story 3=tri-level
                   4=Bi-level  5=One and a half stories)
    House age in yrs (99=99+)
    Type of damper (EVD or TVD)
    Energy consumpt with damper active (in)
    Energy consumpt with damper inactive (out)

Here is the raw data file.

Make a command file that reads and labels the data (including proc format where appropriate). In the data step, create three new variables:

  1. The average of energy consumption with vent damper in and vent damper out.
  2. The difference between energy consumption with vent damper in and vent damper out (make it out minus in).
  3. Type of house with just three categories: Ranch, Two-story and Other.
Obtain the mean, standard deviation, minimum, maximum and sample size for each quantitative variable, using proc means. Run proc freq to get frequency distributions of the categorical variables.

Some of the questions on the quiz will have numerical answers. Be ready to answer questions like the following from your printout:

Also, think of a bunch of reasonable questions you could ask of these data, and decide on the statistical test you would use, limited to t-tests, one-way anova, scatterplots, correlation, simple regression, and chi-square tests of independence. There will be at least one question about this on the quiz.

Here are a few more questions to think about before the quiz:

  1. What is the primary independent variable in this study?
  2. From the brief description of this study, it's hard to tell whether it's experimental or observational. Suppose the primary independent variable was experimentally manipulated.
    1. Imagine you have a sample of homeowners who have volunteered to participate in the study. How would you go about manipulating the independent variable?
    2. What is the potential advantage of having the homeowners unaware of what experimental condition they are in?
    3. Is it reasonable to think they could be kept unaware of what condition they are in? Briefly explain.
  3. Would it be good for the houses to be randomly assigned to have the vent damper in first or out first? Why?

Bring both your log file(s) and your list file to the quiz. Do not write anything on the printouts except your name and student number. You may be asked to hand them in. The list file and log file must be generated by the same SAS run or you will lose a lot of marks. There must be NO ERRORS OR WARNINGS IN YOUR LOG FILE(s). Note that a log file contains a listing of your SAS program, but it has other things we need to see as well.

Hint: Is something funny about the data file? Definitely. Use common sense.


Important note, added Friday Jan. 18th: There are two good ways to do the SAS part of this assignment. You can either have a single program file that includes both the data step and all the proc steps, or you can keep your data step in a separate file, and use %include to bring it in. If you have a single program file, you don't need to read the rest of this note. Just bring one log file and one list file to the quiz.

Handout Two originally did it the second way (with %include), but I changed it to the first way, with a single program file. The reason is that SAS program statements in the file you %include do not appear on your log file, and especially for this first assignment, we need to see how you read and labelled the data.

So, if you used two program files and %include, please do the following. Suppose your data step is in a file called furnaceread.sas, and your main program file has the statement %include 'furnaceread.sas'. At the unix prompt, enter sas furnaceread. This will produce furnaceread.log (which will include a listing of furnaceread.sas) and no list file. Bring both log files as well as your list file to the quiz.