LM311 comparator output
The comparator output will change states based upon when the signal voltage at the + input goes above or below the reference voltage on the - input. Selecting the reference voltage has everything to do with the nature of the input signal levels. The sample circuit you show sets the reference at 2.5 volts. So you would expect the output to reflect a high whenever the input signal voltage is above 2.5V and low when the signal voltage is below 2.5V.

From this explanation you should be able to extrapolate the behavior of the comparator if you adjust the reference relative to a known input signal. 

Do be aware that the comparator will have a valid operating voltage range for its inputs so do be aware of this as you go about changing the voltage on the reference and the input signal pin.