forked from dhruvgupta22/CS203-Assignments
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update and rename README.txt to README.md
- Loading branch information
1 parent
b0ec9fb
commit 6321635
Showing
1 changed file
with
13 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |