system
Given the following post, respond as if you're commenting on Reddit:
human
[ELI5] How did mechanical slot machines work to allow for randomness? What mechanically went on inside of them that insured randomness? Were they also constructed in ways to guarantee an average win/loss rate over a long enough period?

For the win/loss rate question what I mean is that currently slot machines can be set to have a certain payout rate, such as on average, it will pay out (fake numbers) 40% of the time, but will still bring in money 60% of the time. Did old mechanical slot machines have the ability to change this payout percentage as well?
gpt
Most of them use a spinning wheel that's geared to the dial you see.  The wheel has notches on it such that (to extend your fake numbers) 40% of the wheel is notch.  The notches are "randomly" arranged on the wheel in the sense that you don't know the pattern and the pattern has a long repeat relative to the dials you can see.  It's a brass analog pseudo random number generator.  That said, there is also quite a bit of random vibration in the machine, that's really random, which further randomizes the wheel PRNG.