Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Question
One day, an elf jumps out at you from behind a garbage can and proposes a wager. He says that if the weather in Leipzig, Germany tomorrow is sunny, he'll give you $20, if it's cloudy (but dry) he'll give you $1, but if neither of those are the case you owe him $15. Helpfully, he also provides you data that indicates that the probability of sunny weather in Leipzig tomorrow is 40% and cloudy-but-dry is 10%. How much do you expect to win or lose from this wager (if you accept it)?
A)Win $15.60
B)Lose $6.00
C)Lose $7.50
D)Win $0.60
E)Win $4.00
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution
Trending nowThis is a popular solution!
Step by stepSolved in 2 steps
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- Write a program that will figure out the required change for a purchase. Start by asking the user for the price of the product and the amount paid. (We are expecting that the user will give a larger value for the amount paid.) Read in each of these values as a double. Report back to the user the number of each denomination of change due. You are not just telling the user the amount of money he gets back. Hint: Working with integers is much easier. The modulo operator is your friend for this assignment. Also, note that pennies can be tricky due to the poor real number to binary conversions. (Remember that 1.00 could actually be stored as 0.9999999999997.) Do not include five-dollar bills, ten-dollar bills, etc. Only show coins and one-dollar bill amounts. Be sure to test multiple values. There is a test case below. Your program should run the test case exactly as it appears below, and should work on any other case in general. Output Example (User input is marked with >>>.…arrow_forwardThere are 4 balls in a jar (2 black and 2 white). You randomly choose three balls (one by one with no replacement) and paint them according to one of the following methods (a-c) and replace them in the jar. You ask your friend to pick a ball. What is the probability that this ball is white? a. You paint them all black. b. You paint them all the same color as the first ball that is picked c. You look at the majority color (among the 3 selected ones) and paint them all that color. Write a MATLAB code to simulate each of the above 3 cases in MATLAB for 10,000 times and estimate the probability of getting a white ball in each of those casesarrow_forwardThere is more than one way to calculate the value of T. One way that this can be done is by generating random numbers. This works by recognizing that if you take a unit square that you can draw a quarter circle of unit radius inside the square. The area of the quarter circle is exactly π/4 and the area of the square is 1. So if you randomly generate a pair of uniform numbers between 0 and 1 they will be distributed uniformly across the square. If you count the total number of points generated and the number of points (x, y) where x² + y² = ² < 1 then the ratio of those two numbers will tend towards the ratios of the areas of the square and the circle as the number of points generated increases. The ratio of the areas is just π/4 so if you take that ratio and multiply it by 4 you get an estimate for . a) b Write code to estimate π using this method. You can generate random numbers in the range 0arrow_forwardIn the game of 10-pin bowling the bowler has two attempts to knock down pins for every frame of 10-pins, and scores a point for each pin knocked down. If all the pins are knocked down with two attempts, the bowler gets a bonus - whatever score they obtain with their next bowl is doubled. If all the pins are knocked down on the 1st attempt, no 2nd attempt is allowed, and the bowler gets a bonus – whatever score they obtain on their next two bowls are doubled. A student attempts to capture this scoring system in VHDL code, a fragment of which is shown in Figure Q4. Q4 (a) Draw the state transition diagram described by the VHDL of Figure Q4. Discuss whether the VHDL of Figure Q4 correctly scores a game of 10-pin bowling. (b) elsif CLK='1' and CLK'event and UPD='1' then case present state is when throwl => frame := frame + 1; + resize (unsigned (N), 9) score := score if N = w1010" then present state score := score + resize (unsigned (N), 9) present state + resize (unsigned (N),9) if N =…arrow_forwardSabrina is on a game show and is presented with a drawer containing 10 red socks, 10 blue socks, 10 green socks, and 10 yellow socks. Sabrina is to take socks out of the drawer and put them in a bag. She will win $1 for every sock she puts in the bag, as long as the bag does not contain 5 or more socks of one color and 5 or more socks of another color. For example, if she takes 5 red, 4 blue, 3 green, and 2 yellow socks, she would win $14. However, if she took 5 red, 5 blue, 3 green, and 2 yellow socks, she would not win anything because there are two colors (red and blue) that have 5 or more socks each. What is the most money that Sabrina can win? Enter your answer as a single integer only (no words, no dollar signs). A/ What is the minimum number n such that if n socks are removed from the drawer and put into a bag, that the bag will necessarily contain at least 5 socks of one color and at least 5 socks of another color? Enter n as a single integer, no words.arrow_forwardA band of thieves comes up with a series of rules for hiding their loot so that they are always able to find it. The rules are as follows: If the house is next to a lake, then the treasure does not go in the kitchen If the tree in the front yard is an elm, then the treasure is in the kitchen The tree in the front yard is an elm or the treasure is buried under the flagpole If the tree in the backyard is an oak then the treasure is in the garage. You observe that the house where the treasure is hidden is next to a lake. Where is the treasure? discrete matharrow_forwardarrow_back_iosarrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education