Skip to content

Commit

Permalink
Update and rename README.txt to README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
apragati22 authored May 3, 2024
1 parent b0ec9fb commit 6321635
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions Assignment 3/README.txt → Assignment 3/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
Instructions to run the code:
# Generalized Monty Hall Problem
Consider a generalized Monty Hall Problem where there are n doors, with k of the doors having cars and the remaining doors having goats. The host opens one door. Design a simulation to assess the probability of winning for switching (W) versus sticking (T) to the original decision. Plot a surface plot of n, k versus (P(win|W)/P(win|T)). What can you infer from the plot?

## Instructions to run the code:

1. Extract the files from the zip file.
2. Open terminal in the unzipped folder, i.e., the folder containg the python file (CS203assignment_3.py).
3. Write the following command on terminal -
python3 CS203assignment_3.py
```
python3 CS203assignment_3.py
```
4. The code will ask to enter the number of doors, cars and number of trials for calculating the required probabilities. Enter these correctly, then press enter.
5. The code will print the two probabilities for the given set of n, k, number of trials.
6. Then the code will ask to enter the number of doors, cars and number of trials for plotting P(win|switch) / P(win|stay) ratio. Enter these correctly, then press enter.
7. Now the code will show the plot for the given values of n, k and num_trials using 2 libraries: plotly.graph_objects and matplotlib.

Team members - Dhruv Gupta (220361), Pragati Agrawal (220779), Saagar KV (220927), Kundan Kumar (220568), Akula Venkatesh (220109)
### Team members
Dhruv Gupta (220361)\
Pragati Agrawal (220779)\
Saagar KV (220927)\
Kundan Kumar (220568)\
Akula Venkatesh (220109)

0 comments on commit 6321635

Please sign in to comment.