An example  to illustrate a Monte Carlo technique to calculate a quantity.

There are 100 men in a circle.

Each person  picks someone  to his left or right.

What is the distribution of the number that remain unpicked  ? What is the mean and variance ?

Ntrials = 10000;  (* try the experiment 10000 times*)  
Nmen = 100;  (* number of men *)  
Shootlist=Table[0,{i,1,Nmen}]; 
MenRemaining = Table[0,{it,1,Ntrials}]; (* initialize whether person shot left or right *)  
(* men are in positions labeled i from 1 to 100 *)  

Live[i_]:= Module[{ileft, iright}, (* Function to determine if person was shot *)  
ileft = i-1;   (* index of person standing on left *)  
iright =i+1; (* standing on right *)  
If[ileft==0, ileft = Nmen];  (* fix for circular boundary condition *)  
If[iright== Nmen+1, iright =1 ]; 
If[ Shootlist[[ileft]]==1||Shootlist[[iright]]==0,Return[0],Return[1]]];  (* return 0 if shot , 1 if alive *) 

For[ itry = 1,itry ≤ Ntrials,itry++, 
(* create random variable for each person's shooting direction *)  
Shootlist = Table[RandomVariate[BernoulliDistribution[0.5]],{i,1,Nmen}];  (* 1 means shot right, 0 means shot left *)  
remains = Table[Live[i],{i,1,Nmen}]; (* how many remain alive *)  
HowMany = Total[remains];  (* sum up the total *)  
MenRemaining[[itry]]=HowMany   (* create an array of answers for the trials *)  
]

The answer should be that the mean is 25 remain alive.  There are 4 possibilities for each person: shot from left, shot from right, shot from both, or not shot. This means on the average 1/4 chance of survival.  But for small numbers the survival probabilities are correlated.  For large numbers we could assume an uncorrelated Bernoulli PMF with 1/4 chance of survival and 3/4 chance of death.  The Variance for each person would be 1/4**2.  The variance for 100 people (considered independent) would be 100*(1/4)^2 =>  standard deviation of 10*0.25 = 2.5.    The PMF will be roughly Gaussian with the mean at 25 with sigma = 2.5.    Minimum number of survivors is 0 and the maximum is 50.  (This can be seen by considering 4 people at a time. This shows that the minimum number of dead must be 50.  )

Mean[MenRemaining]//N

StandardDeviation[MenRemaining]//N

Histogram[MenRemaining,{0,100,1},Frame->True]