In a small voting district, Poisson(λ) people arrive to vote during a referendum. Each voter votes for the proposal with probability p and against the proposal with probability (1−p). Assume everyone casts their vote independently. If D is the difference between the number of votes for the proposal and the number of votes against the proposal, determine E(D) and Var(D) . Implement a simulation to check your answers. 2.1 If D is the difference between the number of votes for the proposal and the number of votes against the proposal, determine E(D) and Var(D) .

2.2 Implement a simulation to check your answers.