  The COVID-19 pandemic led several countries to resort to social distancing,
the only known way to slow down the spread of the virus and keep the health
system under control. Here we use an individual based model (IBM) to study how
the duration, start date and intensity of quarantine affect the height and
position of the peak of the infection curve. We show that stochastic effects,
inherent to the model dynamics, lead to variable outcomes for the same set of
parameters, making it crucial to compute the probability of each result. To
simplify the analysis we divide the outcomes in only two categories, that we
call {best and worst scenarios. Although long and intense quarantine is the
best way to end the epidemic, it is very hard to implement in practice. Here we
show that relatively short and intense quarantine periods can also be very
effective in flattening the infection curve and even killing the virus, but the
likelihood of such outcomes are low. Long quarantines of relatively low
intensity, on the other hand, can delay the infection peak and reduce its size
considerably with more than 50% probability, being a more effective policy than
complete lockdown for short periods.
