Let's say we have a parameter $r$ and a binary event $A$ repeatedly happens. The event is binary, so the outcome is either $0$ or $1$. We have collected a lot of data of the form $\{\{r_1,A_1\},\{r_2,A_2\},\cdots,\{r_n,A_n\}\}$ where $r_i\in\mathbb{R}$ and $A_i\in\{0,1\}$.

For example: $\{\{-3,0\},\{-2,1\},\{2,1\},\{2,1\},\{1,0\}\}$

Can we somehow estimate the probability of $A$ being $1$ for a certain $r$. From the example data, it seems when $r=2$ that $A=1$ quite certainly. But the data sample is very very large and I'm totally at a loss at how to estimate this probability. When there are a lot of positive outcomes for certain values of $r$ than that increases the probability of a positive outcome for other values close to $r$.

How can all this be accumulated in order to predict (and how confidently) the probability of a positive outcome once we set an arbitrary $r$?

  • 1
    $\begingroup$ In your example the only time $r = 1$ gives a value of $0$ for $A$. $\endgroup$ – Unreasonable Sin Oct 6 '11 at 17:25
  • $\begingroup$ oops, that's $r=2$, gonna fix that. $\endgroup$ – vedran Oct 6 '11 at 17:26
  • $\begingroup$ @vedran Do you assume $r$ follows a continuous distribution ? $\endgroup$ – Sasha Oct 6 '11 at 17:50
  • $\begingroup$ No, $r$ is a totally random real number. Say, the average grade in high-school. And $A$ would be e.g. "person graduated". Then you collect all people and get their average grade, and whether they eventually graduated. I ask then: Based on that data, with my average grade 4.23, how likely am I to graduate? $\endgroup$ – vedran Oct 6 '11 at 17:59
  • $\begingroup$ @vedran How dig of data-set are you talking ? $\endgroup$ – Sasha Oct 6 '11 at 18:00

Your data follow a bivariate distribution with one variable being either 0 or 1. So you should filter your data into $r_{i|0}$ and $r_{i|1}$, and either construct histograms for each type, or perform smooth kernel density estimation, assuming that $r$ follows a continuous distribution, or perform parameter fitting for a suitable family of parametric distributions.

Assume that that was done and frame you question in probabilistic language. Knowing what you need might help you find the shortcut to the answer.

I know this is a vague answer, but you've got to precise your question for me to try to do better.

Added: Given that OP intends $r$ to be a continuous variable, it is better to condition on a non-measure zero event. For a continuous variable, the probability that it equals $4.23$ is zero. It is better to condition that $r$ is within some, possibly small interval.

Here is Mathematica simulation based on a fictitious dataset:

enter image description here

To do it on your own, count the number of graduating students from your dataset with their grade in the specified range, and divide over the total number of students with grades in that range.

  • $\begingroup$ @vedran Please see the addendum to my earlier answer. $\endgroup$ – Sasha Oct 6 '11 at 18:34
  • $\begingroup$ Okay, this certainly helps very much. But something here doesn't make sense. So what if my grades are all, say, $5$, and that's the maximum grade. Then the average would be exactly $5$. You're saying I'm CERTAIN not to graduate? $\endgroup$ – vedran Oct 6 '11 at 20:47
  • $\begingroup$ The important point is to choose your conditioning so that it has non-zero probability. If your grades are exactly all 5, you should choose a small interval around 5. It does not matter if it extends a little over the maximal grade, inequalities will still be satisfied, and your filtering will still produce a non-empty sample. $\endgroup$ – Sasha Oct 6 '11 at 21:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.