Skip to content

Conversation

@evankchan
Copy link
Owner

What changes are you trying to make? (e.g. Adding or removing code, refactoring existing code, adding reports)

I added comments and responses to explaining which parts of the code were sampling, and also altered one piece of the code by using a seed - this ensured that the results were made reproducible!

What did you learn from the changes you have made?

I learned about how change the number of simulations can alter our distribution approximations!

Was there another approach you were thinking about making? If so, what approach(es) were you thinking of?

I thought about testing 10,000 simulations to see how this would changes things!

Were there any challenges? If so, what issue(s) did you face? How did you overcome it?

No hard challenges. The only challenge was trying to interpret the code to answer the first question, but I deduced what each function/line of code was doing through using the comments!

How were these changes tested?

I ran the code multiple times, for 10, 100, and 1000 simulations.

A reference to a related issue in your repository (if applicable)

N/A

Checklist

  • I can confirm that my changes are working as intended

Copy link

@anjali-deshpande-hub anjali-deshpande-hub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good start.

Can you split your answer to Q1 into multiple stages of sampling. For example:

Step 1: Setting Up the DataFrame
Function Used: pd.DataFrame
Sample Size: 1000 individuals
Sampling Frame: The entire population of event attendees, consisting of two event types: weddings and brunches.
Procedure:
The script creates a DataFrame representing 1000 individuals attending events.
200 individuals are assigned to weddings, and 800 to brunches.
Underlying Distribution: Deterministic allocation (200 weddings, 800 brunches).

Step 2: Infecting a Random Subset of Individuals

Step 3: Primary contact tracing

Step 4: Secondary contact tracing

Q2: I think some of your code did not get committed. Please check the screenshot.
Screenshot 2026-01-08 162254

Q3 Answer is missing

Copy link

@anjali-deshpande-hub anjali-deshpande-hub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well done!

Just a few discrepancies:
Q1 - Step 3 (Primary) -
Sample Size: A subset of the infected individuals (20% of infected individuals), as defined by the TRACE_SUCCESS.
Sampling Frame: The subset of infected individuals.
Underlying Distribution: Bernoulli distribution (each infected individual has a 20% chance of being traced).
For each infected individual, a random number is generated to decide whether they are traced. If the random number is less than TRACE_SUCCESS (0.20), the individual is traced.

Step 4: (Secondary contact tracing) Underlying Distribution - Deterministic: secondary tracing is deterministic (all infected at threshold-met events traced), not probabilistic ~20

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants