How to Stop Analog Pin to float

Hello All,
i am working on project in which i have to measure pressure. Pressure sensor is given analog signal which i have to read by analog pin. if i am not connect pressure sensor to analog pin then respective analog pin given me floating vales which is random.

so how could i know is sensor is connected or not. is any logic of method which tell us pin is floating.

Thanks in Advance
Any kind of comment would be appreciated

so how could i know is sensor is connected or not. is any logic of method which tell us pin is floating.

No, there isn't.

Try turning on the internal pullup resistor. Then an unconnected input will read as a steady 1023.
Hopefully the 30K-50K resistor is high enough to not impact the sensor.