I have a known distribution $f(x)$ (in fact, I can safely assume that $f(x)$ is the Maxwell-Boltzmann distribution, i.e. $f(x)\propto x^2 \exp(-x^2)$). I take $N$ samples from the distribution, but am only interested in a subset of these samples: samples that are larger than $x\_0$ (a fixed and known value). I'll denote the number of samples that satisfy this condition $M$, and the subset itself I'll denote $X\_{x\_0}$.
For each of the $M$ samples in $X\_{x\_0}$, I perform a Bernoulli trial with a constant probability $p$. What I'm interested to know is the variance of the number of successful trials.
So, my two questions are:


1. Am I correct in thinking that the distribution of the number $M$ (number of samples larger than $x\_0$) is binomial: $f(M) = B(N,p\_{x\_0})$, where $p\_{x\_0} = \int\_{x\_0}^{\infty} f(x)dx$? (I assume I'm correct, but I'm never sure when it comes to probability theory and statistics).
2. Second, and more important question: is there an expression of the variance of the number of successful trials? Or perhaps it's possible to derive a closed-form expression for the distribution of the number of successful trials? So I assume it would depend on three parameters: number of initial samples $N$, probability $p\_{x\_0}$ of a sample exceeding the treshold value $x\_0$, and probability $p$ of a successful Bernoulli trial.


Thanks!



Distribution of a two-part sampling process
For each $x\_i$ of the $N$ samples you perform simultaneously two checks: Is $x\_i$ larger than $x\_0$ (with probability $p\_{x\_0}$ and then your Bernoulli trial with probability $p$. Assuming independence of this trial and the check $x\_i > x\_0$ the probability is $p \cdot p\_{x\_0}$ that you have a successful trial. Thus (assuming independence of the particles) $B(N,p \cdot p\_{x\_0})$ is the distribution of successful trials with expectation $N \cdot p \cdot p\_{x\_0}$ and variance $N \cdot p \cdot p\_{x\_0} \cdot (1- p \cdot p\_{x\_0})$.


