What's the purpose of the resistor in this circuit?
brk: It's a pull-down resistor.Without it, when the temp sensor/thermistor was at infinite resistance, the Arduino pin would essentially be floating, and you'd get erratic readings.A pull down resistor is usually proportionally very high resistance in relation to the sensor or other device that is the variable in the circuit.If it were tied to Vcc, it would be a pull UP resistor, but same concept.The idea behind it is that the pin is never just left "open".  If there is no voltage coming through the sensor (temp sensor in this case), then the resistor pulls the pin to ground and you would get a reading of zero volts.You want the resistance of the pull-down (or pull-up) to be high, 10K-100K are typical values.  Voltage drops across all elements in a circuit, in proportion to that elements resistance in relation to the total circuit resistance.If the temp sensor ranged from 0K to 10K, and you used a 10K pull-down, then you would have a range of 5V-2.5V for readings at that pin.  As you scale up the value of the pull-down resistor, you will get less voltage drop across that resistor, meaning that you have a wider voltage range at the input pin for the same temperature variance, which results in more precise readings.