Temperature/Sun/Water
Consumption Example
Assume that during a three-hour period spent outside, a person recorded the temperature, the presence of sun and their water consumption. If the sun was present the number 1 was recorded; otherwise the number 0 was recorded for the sun variable. The experiment was conducted on 7 randomly selected days during the summer. The data is shown in the table below with the temperature placed in increasing order.
| Temperature (F) | Sun | Water Consumption (ounces) |
| 75 | 1 | 16 |
| 83 | 0 | 20 |
| 85 | 0 | 25 |
| 85 | 1 | 27 |
| 92 | 0 | 32 |
| 97 | 1 | 48 |
| 99 | 0 | 48 |
The multiple regression equation using the method of least squares is shown below. (Instructions for obtaining this equation will be shown later in the tutorial.)
Water = - 107 + 1.54*Temperature + 5.37*Sun
This equation can be used for prediction of the amount of water a person would drink for a given temperature depending on whether or not they were in the sun or not in the sun.
Example of Prediction with two cases -- in the sun and not in the sun:
Assume that the temperature is 90 degrees and that the person is in the sun for the three hour period. (Sun = 1)
Water = - 107 + 1.54*90 + 5.37*1=36.97 oz.
Assume that the temperature is 90 degrees and that the person is NOT in the sun for the three hour period. (Sun = 0)
Water = - 107 + 1.54*90 + 5.37*0=31.6
Interpretation: Indicator Variable
When the temperature is held constant and the sun is present the y-intercept will be raised by 5.37 ounces.
Interpretation rest of the equation:
The y-intercept represents how much water a person would drink when he/she is NOT in the sun (Sun=0) and the temperature is zero degrees (F). This value is -107 and is not logical. This results from a temperature of 0 degrees F being outside the prediction region for our model.
When the indicator variable for being in the sun or not is held constant, for every increase in one degree (F) the amount of water consumed increases by 1.54 ounces.
Measure the strength of the association
R-Sq = 97.4 %
R-Sq(adj) = 96.1%
S = 2.513
The R-Sq value indicates that 97.4% of the variation in the dependent variable can be explained by the independent variables and this model. The R-Sq adjusted is only slightly lower than the R-Sq which indicates that even with the adjustment for adding an extra variable (Sun) we still have a strong association in the model.
S is the standard error of the model which is also the square root of the mean squared error. The smaller the value of S, the stronger the linear relationship.
Learn the Procedure for Modeling with Indicator Variables
Regression Tutorials Menu STATS @ MTSU Dictionary