IIRC it is studied that cars behave more dangerously around bikers with helmets while they give a wide berth to unhelmeted bikers.
There was one study about that, which was... not very robust science. It relied on self-report of the biker (and if I remember correctly, it was just a single one, so not enough data).
Here is another study, where they measured the distance to overtaking cars with a distance sensor:
https://www.sciencedirect.com/science/article/abs/pii/S00014...
"A Trek hybrid bicycle was fitted with a Massa M-5000/95 temperature-compensated ultrasonic distance sensor with its centre 0.77 m from the ground, facing perpendicularly to the direction of travel and feeding into a laptop computer running MultiLab software via a MultiLog Pro data-logger sampling from the sensor at 50 Hz."