# One Numerical Explanatory Variable

Learn about numerical explanatory variables and how they can be used in regression.

## We'll cover the following

Why do some professors and instructors at universities and colleges receive high teaching evaluations scores from students while others receive lower ones? Are there differences in teaching evaluations between instructors of different demographic groups? Could there be an impact due to student biases? These are all questions that are of interest to university/college administrators. It’s because teaching evaluations are among the many criteria considered in determining which instructors and professors get promoted.

Researchers at the University of Texas in Austin, Texas (UT Austin) tried to answer the following research question: What factors explain differences in instructor teaching evaluation scores? To this end, they collected instructor and course information on 463 courses.

We’ll keep things simple for now and try to explain differences in instructor teaching scores as a function of one numerical variable: the instructor’s “beauty” score (we’ll describe how this score was determined shortly). Is it possible that instructors with higher beauty scores also have higher teaching evaluations? Can it be instead that instructors with higher beauty scores tend to have lower teaching evaluations? Or can it be that there’s no relationship between the beauty score and teaching evaluations? We’ll answer these questions by modeling the relationship between teaching scores and beauty scores using simple linear regression, where we have:

A numerical outcome variable y (the instructor’s teaching score)

A single numerical explanatory variable x (the instructor’s “beauty” score)

## Exploratory data analysis

The data on the 463 courses at UT Austin can be found in the `evals`

data frame included in the `moderndive`

package. However, to keep things simple, let’s `select()`

only the subset of the variables we’ll consider in this lesson. Then, we’ll save this data in a new data frame called `evals_ch5`

:

Get hands-on with 1200+ tech skills courses.