Does anyone have any suggestions on implementing an analogue solution to the common digital de-bounce problem?

The switch output is monitored via an ADC input. My language here is based on a momentary type device. So operationally, you’d have a voltage that hovers around value NP (not pressed). The voltage changes to around P (pressed) when the switch is pressed. The new thing here is that N and NP might be any DC voltage, eg. NP ~ 11V and P ~ 6V, but these are just examples and their relative magnitudes are arbitrary.

Without dwelling on the why, I’d like to ask about the how :

Note:

- A simple stochastic solution seems to be to just calculate the mean ADC reading over X samples. If the mean reading is > or < than some (threshold + tolerance) then the switch state is known. Say 20% or 80%?
- The internal ADC can reliably operate > 50 kSa/s given a low impedance source.
- Should the ratio of N to NP be either ~0.5 or ~2, a simple resistor divider getup might not be easily used to map the monitored voltages to {logic high, logic low}. And clearly if N, NP << 5V, then resistor networks are inadequate. I wouldn’t want to develop the hardware beyond simple resistors.
- Is something similar already used in over current detection in industrial motors?