Homework 3 – World Series and Inpatient Payment System
This assignment has two parts: one that takes information from the web and one that takes it from a file. To select the type of information to gather, a menu will be used. Although the assignment does not require the use of functions, they can be useful.
***** This question uses Python Programming Language. The website can not be provided in the question, but the website entails every World Series since 1903, the year it was played, the team who won, the team who lost, and what the series score was. *****
MENU
The menu will have six choices.
WEB
The program will go to this website: On that page is a table showing
Gather all these statistics into one of these configurations: a single list, multiple lists, or a dictionary. Another method could be to store the information in one or more files. There is no requirement for having a certain method for storing this information. It is your choice.
See the MENU section for the required information to gather.
FILE
Open it to find this information:
The results of the Charges or the Referrals will be written to a file.
Both the Web and File sections can go in one module. You can do separate modules, if you wish.
See the attached rubric for requirements.
Rubric
|
Homework 3 - World Series and Inpatient Payment |
Points |
|
Is there a main function? |
|
|
Yes (5) |
5 |
|
Is the code inside main? |
|
|
Yes (5) |
5 |
|
Is there a menu? |
|
|
Yes (5) |
5 |
|
Does the menu work? |
|
|
Yes (5) |
5 |
|
WEB |
|
|
Did you get the title? |
|
|
Yes (5) |
5 |
|
Did you get the years where there were shutouts? |
|
|
Yes (10) |
10 |
|
Did you do one of the options? Winner / Loser or |
|
|
Yes (10) |
10 |
|
FILE |
|
|
Did you get the number of records in South Dakota? |
|
|
Yes (10) |
10 |
|
Did you do one of the options? Average Charges / |
|
|
Yes (10) |
10 |
|
Did you write the charges / referrals to a file? |
|
|
Yes (10) |
10 |
|
Did you use variables? |
|
|
Yes (15) |
15 |
|
Is standard variable naming used? |
|
|
Yes (5) |
5 |
|
Is the standard function naming used? |
|
|
Yes (5) |
5 |
|
Are all errors handled? |
|
|
Yes (30) max of 3 @ 10 pts. each |
30 |
|
Are comments used? |
|
|
Header (5) |
5 |
|
Body (10) |
10 |
|
Is the code written neatly? |
|
|
Yes (5) |
5 |
|
Are the results displayed neatly? |
|
|
Yes (5) |
5 |
|
Miscellaneous: anything not in the |
10 |
In: Computer Science
Homework 3 – World Series and Inpatient Payment System
This assignment has two parts: one that takes information from the web and one that takes it from a file. To select the type of information to gather, a menu will be used. Although the assignment does not require the use of functions, they can be useful.
***** This question uses Python. The website can not be provided in the question, but the website entails every World Series since 1903, the year it was played, the team who won, the team who lost, and what the series score was. *****
MENU
The menu will have six choices.
WEB
The program will go to this website: On that page is a table showing
Gather all these statistics into one of these configurations: a single list, multiple lists, or a dictionary. Another method could be to store the information in one or more files. There is no requirement for having a certain method for storing this information. It is your choice.
See the MENU section for the required information to gather.
FILE
Open it to find this information:
The results of the Charges or the Referrals will be written to a file.
Both the Web and File sections can go in one module. You can do separate modules, if you wish.
See the attached rubric for requirements.
Rubric
|
Homework 3 - World Series and Inpatient Payment |
Points |
|
Is there a main function? |
|
|
Yes (5) |
5 |
|
Is the code inside main? |
|
|
Yes (5) |
5 |
|
Is there a menu? |
|
|
Yes (5) |
5 |
|
Does the menu work? |
|
|
Yes (5) |
5 |
|
WEB |
|
|
Did you get the title? |
|
|
Yes (5) |
5 |
|
Did you get the years where there were shutouts? |
|
|
Yes (10) |
10 |
|
Did you do one of the options? Winner / Loser or |
|
|
Yes (10) |
10 |
|
FILE |
|
|
Did you get the number of records in South Dakota? |
|
|
Yes (10) |
10 |
|
Did you do one of the options? Average Charges / |
|
|
Yes (10) |
10 |
|
Did you write the charges / referrals to a file? |
|
|
Yes (10) |
10 |
|
Did you use variables? |
|
|
Yes (15) |
15 |
|
Is standard variable naming used? |
|
|
Yes (5) |
5 |
|
Is the standard function naming used? |
|
|
Yes (5) |
5 |
|
Are all errors handled? |
|
|
Yes (30) max of 3 @ 10 pts. each |
30 |
|
Are comments used? |
|
|
Header (5) |
5 |
|
Body (10) |
10 |
|
Is the code written neatly? |
|
|
Yes (5) |
5 |
|
Are the results displayed neatly? |
|
|
Yes (5) |
5 |
|
Miscellaneous: anything not in the |
10 |
In: Computer Science
Homework 3 – World Series and Inpatient Payment System
This assignment has two parts: one that takes information from the web and one that takes it from a file. To select the type of information to gather, a menu will be used. Although the assignment does not require the use of functions, they can be useful.
***** This question uses Python Programming Language. The website can not be provided in the question, but the website entails every World Series since 1903, the year it was played, the team who won, the team who lost, and what the series score was. *****
MENU
The menu will have six choices.
WEB
The program will go to this website: On that page is a table showing
Gather all these statistics into one of these configurations: a single list, multiple lists, or a dictionary. Another method could be to store the information in one or more files. There is no requirement for having a certain method for storing this information. It is your choice.
See the MENU section for the required information to gather.
FILE
Open it to find this information:
The results of the Charges or the Referrals will be written to a file.
Both the Web and File sections can go in one module. You can do separate modules, if you wish.
See the attached rubric for requirements.
Rubric
|
Homework 3 - World Series and Inpatient Payment |
Points |
|
Is there a main function? |
|
|
Yes (5) |
5 |
|
Is the code inside main? |
|
|
Yes (5) |
5 |
|
Is there a menu? |
|
|
Yes (5) |
5 |
|
Does the menu work? |
|
|
Yes (5) |
5 |
|
WEB |
|
|
Did you get the title? |
|
|
Yes (5) |
5 |
|
Did you get the years where there were shutouts? |
|
|
Yes (10) |
10 |
|
Did you do one of the options? Winner / Loser or |
|
|
Yes (10) |
10 |
|
FILE |
|
|
Did you get the number of records in South Dakota? |
|
|
Yes (10) |
10 |
|
Did you do one of the options? Average Charges / |
|
|
Yes (10) |
10 |
|
Did you write the charges / referrals to a file? |
|
|
Yes (10) |
10 |
|
Did you use variables? |
|
|
Yes (15) |
15 |
|
Is standard variable naming used? |
|
|
Yes (5) |
5 |
|
Is the standard function naming used? |
|
|
Yes (5) |
5 |
|
Are all errors handled? |
|
|
Yes (30) max of 3 @ 10 pts. each |
30 |
|
Are comments used? |
|
|
Header (5) |
5 |
|
Body (10) |
10 |
|
Is the code written neatly? |
|
|
Yes (5) |
5 |
|
Are the results displayed neatly? |
|
|
Yes (5) |
5 |
|
Miscellaneous: anything not in the |
10 |
In: Computer Science
A ship is carrying 30 travelers from various great houses on a long sea voyage from Braavos to King’s Landing where they will participate in the Game of Thrones: 5 are from House Targaryen(TAR), and 5 from House Lannister (LAN) 4 are from House Stark (STA) and 4 from House Tyrell (TYR) 3 are from House Baratheon (BAR) and 3 from House Martell (MAR) 1 from each of the following houses: House Arryn (ARR), House Tully (TUL), House Greyjoy (GRE), House Bolton (BOL), House Frey (FRE), House Mormont(MOR) You are now asked to evaluate probabilities relating to this voyage. Part 1 - Leaving the Ship Only 9 of the 30 travelers will end leaving the ship when they reach King’s Landing. Based solely on the number of travelers per house, what is the expected value of the number of travelers from LAN leaving the ship? the number of travelers from STA leaving the ship? the number of travelers from BOL leaving the ship? Part 2 - Game of Thrones The following 9 competitors end up leaving the ship and participating in the Game of Thrones: 3 from TAR, 2 from LAN, 2 from STA, 1 from GRE' and 1 from MAR. At the end of the Game of Thrones,only 3 of the 9 competitors will win titles: 1 will win the Iron Throne (I), 1 will end up being the Hand of the King (H) 1 will be the King of the North (N) Nobody can win more than one title. In how many different ways can these 3 titles be distributed among the 9 competitors? In how many different ways can these 3 titles be distributed among the 5 participating houses? (in other words we are asking you to figure out how many possible combinations of titles by houses there can be.) Your answer should not be derived by listing all the possibilities one by one. Instead you should derive your answer by reasoning with known formulas for permutations and combinations. Based solely on the number of competitors per house and not on their ability to wield a sword, axe, or their ability to devise a cunning plan, what is the probability that GRE will win at least one title? Based solely on the number of competitors per house and not on their ability to wield a sword, axe, or their ability to devise a cunning plan, what is the probability that LAN will win at least one title? Based solely on the number of competitors per house and not on their ability to wield a sword, axe, or ability to devise a cunning plan, what is the probability that TAR will win at least one title?
In: Statistics and Probability
use r programming, details on the codes please.
Consider an urn with 10 balls inside, 7 of which are red and 3 of which are green. Select 3 balls successively from the urn. Let A = {1 st ball is red}, B = {2 nd ball is red}, and C = {3 rd ball is red}. Then P(all 3 balls are red) = P(A ∩ B ∩ C)
a) Calculate the Probability with R?
(1)
b) Also, what is the probability of observing red, then green, then red? (1)
Let us roll a 4-sided die three times. a)Let us define the random variable U = X1 − X2 + X3. What is the probability that U > 6. (1) b) Also, if A = X1+X2+X3, What is the probability of A > 9.(1)
3. Randomized Controlled Trials are a type of medical experiment,
where the eligible participants are randomly assigned (allocated)
to one of the two (or more) branches of the study. A randomized
controlled trial is considered the gold standard of clinical
trials. In these studies, randomization helps to control for
confounding factors, and evenly distribute prognostic factors
across groups. This is somewhat like a loaded dice experiment.
Let’s create an “unfair” dice that has a 0.35 probability of resulting in a 6, and a probability of 0.13 for each of the other outcome.
Hint: Use the sample command.
a) Simulate a sample of 10 trials of throwing the dice. (1)
b) How many 6’s do you get count using R. (1)
Write a function cancerservival where the probability of cure,
recurrence, metastasis and death are (0.3, 0.3, 0.25 and 0.15
respectively). (2)
a) Use the function to simulate the results of 100 cancer
occurrences. (1)
b) Report the number of patients cured. (1)
In: Statistics and Probability
6. Discrete probability distributions #2
You may calculate the answers of the following questions using the equations in your textbook for the appropriate probability distribution function. (You will need to read the questions first to determine the appropriate distribution.) However, you may also determine these answers by using the Distributions tool. Select the appropriate distribution from the dropdown box in the upper left-hand corner. Set the parameters accordingly, and select the radio button in the lower left-hand corner depending on whether you want the probability of a single outcome (left) or a cumulative probability (right).
The Geminids is an annual meteor shower that appears every December. Under a clear, dark sky, an observer of the Geminids would see an average of 20 meteors per 10-minute period (if the meteors’ emanation point were directly overhead).
a. It’s December and you host a Geminids party on the peak night of the meteor shower. The sky is clear and dark, and the meteors’ emanation point is directly overhead. You and your friends watch the sky for 10 minutes. The probability that you see exactly 20 meteors is______.
0.4409
0.1322
0.0309
0.0888
b. The probability that you see more than 16 meteors while watching the night sky for 10 minutes is_________.
0.0646
0.7789
0.4634
0.8435
c. After going inside for a midnight snack, you and your friends go back outdoors for a 5-minute sky-gazing session. The probability that you observe no more than 14 meteors during this sky-gazing session is ______.
0.7973
0.6618
0.9165
0.0835
d. The number of meteor sightings over 20 minutes has an expected value of________ and a standard deviation of_______.
-----20,14,7.6,40
-----6.32,2.76,40,3.74
In: Statistics and Probability
Without doing any calculations, arrange the elements in FeCO3 in order of decreasing mass percent composition. (Highest to Lowest)
In: Chemistry
The hydrides of group 5A are NH3, PH3, AsH3, and SbH3. Arrange them from highest to lowest boiling point.
In: Biology
In general, when comparing compounds of similar molecular weight, which of the following would have the highest boiling point?
In: Chemistry
What is the highest authority in the Fed called?
a) Fed Minister
b) President
c) Chancellor
d) None of the Above
In: Finance