# Generating variables using R

Question:

Assume 2 treatments, 1 and 0. Given 120 participants, generate underlying truth with

• Age as a discrete uniform distribution over integers between [20-60]
• Gender (G) as $$I\{G = F\} \sim \text{Bernoulli}(0.5)$$
• Potential outcomes matrix
• $$Y_i(0) \sim \text{Poisson}(5)$$, $$Y_i(1) \sim \text{Poisson}(10)$$ for Female, and
• $$Y_i(0) \sim \text{Poisson}(6)$$, $$Y_i(1) \sim \text{Poisson}(6)$$ for Male.

a. Find the causal effect for males and females respectively.

b. Generate the sampling distributions of $$Pr(\text{Female} | Z=1)$$, using 10,000 i.i.d. allocation vectors under: Coin toss with $$Pr(\text{Treatment}) = 2/3$$.

I've calculated the causal effect using the distributions mentioned in the question. However, I do not know what it means by the generating sampling distribution using coin toss with $$Pr(\text{Treatment})$$. Please advise or provide hints for me. Thanks

• "coin toss" means the binomial distribution. – Roland Sep 9 at 8:05