# Exploratory Analysis - 3

Exploratory Analysis - 3

### Logistic Regression with a Quantitative Variable (Pass/Fail on x = Gravity)

Now, let's see if the quantitative variable gravity has any effect on the passing or failing and test: Model: $$ln \pi(x)/[1-\pi(x)]$$. We can use the SAS program water_level2.sas below to do this.

Our hypothesis is:

H0 : No gravity effect or H0 : β1 = 0 vs. the alternative Ha : β1 ≠ 0

The output from the program provides us with a G2 = 42.1765...

Therefore, we must reject H0, there is no gravity effect and conclude there is a statistically significant difference between the gravity score and the proportion passing the task.

We can fit the model using the values from the output:

such that the:

Fitted Model: Estimated logit[π (x)] = -2.8156 + 0.7998x

Here is the Odds Ratio Estimates output:

which in a sense tell us that the odds of passing the water level task increase by 2.225 for each additional right answer on gravity.

If we take the observed and fitted proportions that are given (below) in the output:

we have added a couple of lines of code to our program so that SAS displays a graph of the observed and fitted(phat) proportions, below:

How does the 'fit' look?

 [1] Link ↥ Has Tooltip/Popover Toggleable Visibility