Optimum current for analog measurements?

I want to achieve the best possible analog measurement with an Arduino Uno and a simple voltage divider (soft potentiometer). What resistance should the potentiometer have for best precision? The potentiometer is disconnected when not in use so a pullup or pulldown resistor is required to detect this condition.

10 Kiloohm potentiometers seem to work fine and are often used with Arduino projects. A 100 Kiloohm potentiometer might save energy, but there seems to be random noise sometimes. Is there a way to calculate the best resistance to match the Uno's AD input?

I could either activate the internal pullup resistor by software or use an external one. Which is better? Is pullup or pulldown better, internal or external?

I understand that the pullup/pulldown resistor will slightly distort the measurement. So would it be a good idea to disable it once I have detected a connection? (Speed should not be an issue, I need less than 100 measurements per second).

Thank you for any explanations or links. This subject should certainly have been discussed before, but I cannot find it anywhere (this is my first posting).

Datasheet says device should have 10K output impedance to drive the internal sampling & hold capacitor that makes up part of the ADC.

Internal pullup is fine for reading ~1023 and nothing connected externally.
External pullup/pulldown can not be disconnected - internal can:
pinMode (Dx, INPUT);
digitalWrite (Dx, LOW);
then perform analogReads.

When done reading, turn it back on if desired:
pinMode (Dx, INPUT);
digitalWrite (Dx, HIGH);

Thank you for the fast response, this helps a lot.

I had not found these data before. Arduino.cc does not give any detailed spec of the AD converters, but refers to the data sheet of the Atmel ATmega48PA/88PA/168PA/328P. On page 257, in the chapter "23.6.1 Analog Input Circuitry", this document states what you were probably referring to:

"The ADC is optimized for analog signals with an output impedance of approximately 10 k? or less. If such a source is used, the sampling time will be negligible. If a source with higher impedance is used, the sampling time will depend on how long time the source needs to charge the S/H capacitor, which can vary widely. The user is recommended to only use low impedance sources with slowly varying signals, since this minimizes the required charge transfer to the S/H capacitor."

"If conversion accuracy is critical,...: If any ADC [3..0] port pins are used as digital outputs, it is essential that these do not switch while a conversion is in progress."

Regarding the suggestion to turn off the pull-up resistor during measurement, I will probably have to wait a few microseconds after turning off and before measuring, in order not to spoil precision. What do you think?

Perhaps. Perhaps not. Try it without and see. If the 20K to 50K pullup affects your signal, turn it off.