Skip to content

UofT-DSI | sampling - Assignment 1#1

Open
hayun120 wants to merge 2 commits into
mainfrom
assignment-1
Open

UofT-DSI | sampling - Assignment 1#1
hayun120 wants to merge 2 commits into
mainfrom
assignment-1

Conversation

@hayun120

Copy link
Copy Markdown
Owner

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

I completed assignment 1 by inspecting the script to answer questions re sampling, and also modified the code to make it reproducible by setting a fixed random seed before running the simulation.

What did you learn from the changes you have made?

I learned how to identify different sampling functions and underlying distributions. I also learned that reproducibility is sensitive to sample size - with only 10 or 100 repetitions, results varied more substantially across runs due to the high variability of smaller samples.

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

N/A

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

The main challenge would have been deciphering where to place the 'np.random.seed'. Placing it inside the simulate_event() function resets the generator on every iteration, causing all 1000 simulations to produce identical results. Placing it once before the results = [...] ensured the full sequence of simulations was seeded correctly.

How were these changes tested?

The modified script was run multiple times, and the output histogram was inspected to confirm the changes. The simulation was also tested at 10, 100, and 1000 repetitions as instructed to verify consistent output at each level.

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

N/A

Checklist

  • I can confirm that my changes are working as intended

@namraschazil

Copy link
Copy Markdown

Great work. Pass!
Overall a carefully executed assignment with adequate reasoning provided for the stages of sampling.

@namraschazil namraschazil left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Great work. Pass!
Overall a carefully executed assignment with adequate reasoning provided for the stages of sampling.

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.

2 participants