Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Consider the set of sequences of zeroes and ones of length $N$ with $k$ ones (or, Np ones where $p=k/N$). We draw randomly and uniformly a sequence from this set.
I want to show that with probability tending to $1$ as $N→∞$, there are approximately $kN/2$ (or $Np/2$) ones in the first half of this sequence.
$\begingroup$@Mark: I also posted this question in mathexchange (after Dougkas comment). Robert Israel also asked this question, and my answer: You right, in the case of irrational $p$ we can't have exactly $Np$ $1$'s. However, for very large $N$ we can approximate it with "error" small as we want. By the way, in this site : j.ee.washington.edu/~bilmes/classes/ee515a_spring_2012/… you can find a lecture notes in which there are some nice properties of type class (starting from page 13 in the pdf), which maybe will help.$\endgroup$