# How can you estimate uncertainty of a binary measurement?

I am working on an experiment which detects signals as a a function of time. There can be a trigger, but no signal (0) or a trigger with a signal (1). We are interested in how the ratio (likelihood of getting 1) changes over time. In order to study this we need to group the data.

If I group the data points in groups of 100 or 1000, I can of course calculate a standard deviation - but this is dependent on the group size I pick. Is there a better way to calculate this? How?

Here is an image where for each plotted point 100 data points (0 or 1 ) were grouped together.The standard deviation would be 0.04287168.

Here 1000 data points are grouped together, so the shift in time is better visible. The standard deviation would be 0.03030996.

• you do not have to group it. you can use logistic regression. most possibly with a spline input basis to allow a non linear relationship. Please edit your question to specify in more detail what exactly you want to test - "We are interested in how the ratio (likelihood of getting 1) changes over time." - use 'scientific terms' and the statisticians here can translate it into statistical methodology. Commented Jun 5, 2023 at 9:27