Flip all 3 coins 10 times. Each flip place a tally mark next to the number of heads in the following table
|
Experiment 1 |
|
|
Number of Heads |
TallyMark |
|
0 |
1 |
|
1 |
4 |
|
2 |
5 |
|
3 |
0 |
|
Total Tosses |
10 |
|
Experiment 2 |
|
|
Number of Heads |
TallyMark |
|
0 |
7 |
|
1 |
17 |
|
2 |
16 |
|
3 |
10 |
|
Total Tosses |
50 |
|
Experiment 3 |
|
|
Number of Heads |
TallyMark |
|
0 |
16 |
|
1 |
41 |
|
2 |
27 |
|
3 |
16 |
|
Total Tosses |
100 |
For each of the tables on the previous side, make a frequency distribution and a relative distribution
10 Tosses
50 Tosses
100 Tosses
1. Draw a tree Diagram to represent the event of tossing three coins
2. What is the sample space for this event?
3. Using the random variable, X, that measures the number of heads when you toss three coins, write the theoretical probability distribution.
4. Write a few sentences that compare and contrast the relative frequencies between the three experiments. Why are they different or similar?
5. Write a few sentences that compare relative frequencies with the theoretical probabilities. Why would they be similar or different? What happens as the number of trials gets bigger?
In: Statistics and Probability
Write a C program called cards.c that simulates some card game logic by comparing the cards from 4 people and determining which person has the best card. The program MUST work as follows:
Eachcardmustberepresentedbyexactlytwocharsrepresenting a rank and a suit. The possible rank options are: '2', '3', '4', '5', '6', '7', '8', '9', 'T', 'J', 'Q', 'K', 'A'. The possiblesuit options are: 'H', 'D', 'S', 'C'. So 6H represents the “6 of hearts”, JC represents the “Jack of Clubs” etc...
YouMUSTwriteafunctioncalledisValidRank(charc)which determines if the given character is one of the ranks mentioned above. It should return a char with a value of 1 if the character is a valid rank and 0 otherwise. Lowercase letters are not valid.
YouMUSTwriteafunctioncalledisValidSuit(charc)whichdeterminesifthegivencharacter is one of the suits mentioned above. It should return a char with a value of 1 if the character is a valid suit and 0 otherwise. Lowercase letters are not valid.
You MUST have a function called getTrump() that returns a char. It should prompt the user for a trump suit, which must be 'H', 'D', 'S' or 'C'. It should be robust, in that any invalid input is not accepted. It should only return from the function when a valid suit has been entered, and it must make use of the isValidRank() function. For any invalid entry, an appropriate error message should be given. Blank entries are invalid and so are lowercase letters.
The main function should first get the trump suit, by calling the above function. It should then enter an infinite loop to do the following: (1) ask for 4 cards from the user, (2) display the 4 cards entered, (3) determine and display which player wins the round (i.e., which one has the “best” card). These steps will be explained below.
6. Whenenteringthecards...yourcode should be robust and handle any input, just like you did in thegetTrump() function. For each of the 4 cards entered, your code should allow the user to enter two characters and then press enter. If the first character (i.e., the rank) is invalid (use the function you wrote earlier), then an appropriate error message should be displayed and the second character (i.e., the suit) should not be prompted for. If it was valid, then the suit character should be prompted for.
Player 1: Enter card
rank andRC
Invalid card, please re-enter Player 1: Enter card rank and4F
Invalid card, please
re-enter Player 1: Enter card rank and6
Invalid card, please re-enter Player 1: Enter card rank andH
Invalid card, please
re-enter Player 1: Enter card rank andJC
Player 2: Enter card rank and6S
Player 3: Enter card rank and
suit (e.g., 2S, TC, KD)
suit (e.g., 2S, TC, KD)
suit (e.g., 2S, TC, KD)
suit (e.g., 2S, TC, KD)
suit (e.g., 2S, TC, KD) suit (e.g., 2S, TC, KD) suit (e.g., 2S, TC, KD)
suit (e.g., 2S, TC, KD)
suit (e.g., 2S, TC, KD) suit (e.g., 2S, TC, KD)
is invalid, another
error message
should be shown. Either way, the
code should keep prompting until a
valid card is entered before moving on
to get the next player’s card. Here is
an example of what you should do à 5H
If it
Invalid card, please
re-enter Player 3: Enter card rank and9d
Invalid card, please re-enter Player 3: Enter card rank and9D
Player 4: Enter card rank and
Once4validcardentrieshavebeenentered,the4cardsshouldbedisplayedlikethis:
JC, 6S, 9D, 5H
You must then determine which card wins the round. That is, which player has the best card. To do this, you must follow these rules:
A card which is of the trump suit always beats a card that is a non-trump suit.
If two cards have the same suit, the one with the higher rank is better. 'A' is the highest
rank and '2' is the lowest.
The card played by player 1 is called the “suit led”. If no other player has a higher ranking card of the same suit as the suit led, and no other player has the trump suit, then player 1 has the best card and wins.
Inyourmainfunction,iftherankofthefirst(orany)playerisa'.'character,thentheprogram should quit. The TA’s will need this functionality in order to test your program.
Show transcribed image text
View comments (1)
In: Computer Science
Q: A computer consulting firm presently has bids out on three projects. Let Ai = {awarded project i}, for i = 1, 2, 3, and suppose that P(A1) = 0.23, P(A2) = 0.25, P(A3) = 0.29, P(A1 ∩ A2) = 0.07, P(A1 ∩ A3) = 0.05, P(A2 ∩ A3) = 0.08, P(A1 ∩ A2 ∩ A3) = 0.02. Use the probabilities given above to compute the following probabilities, and explain in words the meaning of each one. (Round your answers to four decimal places.)
(a) P(A2 |
A1) =
Explain this probability in words.
If the firm is awarded project 2, this is the chance they will also be awarded project 1. If the firm is awarded project 1, this is the chance they will also be awarded project 2. This is the probability that the firm is awarded either project 1 or project 2. This is the probability that the firm is awarded both project 1 and project 2.
(b) P(A2 ∩
A3 | A1) =
Explain this probability in words.
This is the probability that the firm is awarded projects 1, 2, and 3. If the firm is awarded project 1, this is the chance they will also be awarded projects 2 and 3. If the firm is awarded projects 2 and 3, this is the chance they will also be awarded project 1. This is the probability that the firm is awarded at least one of the projects.
(c) P(A2 ∪
A3 | A1) =
Explain this probability in words.
If the firm is awarded project 1, this is the chance they will also be awarded at least one of the other two projects. This is the probability that the firm is awarded at least one of the projects. If the firm is awarded at least one of projects 2 and 3, this is the chance they will also be awarded project 1. This is the probability that the firm is awarded projects 1, 2, and 3.
(d) P(A1 ∩
A2 ∩ A3 |
A1 ∪ A2 ∪
A3) =
Explain this probability in words.
This is the probability that the firm is awarded at least one of the projects. This is the probability that the firm is awarded projects 1, 2, and 3. If the firm is awarded at least two of the projects, this is the chance that they will be awarded all three projects. If the firm is awarded at least one of the projects, this is the chance that they will be awarded all three projects.
Q: Three couples and two single individuals have been invited to an investment seminar and have agreed to attend. Suppose the probability that any particular couple or individual arrives late is 0.38 (a couple will travel together in the same vehicle, so either both people will be on time or else both will arrive late). Assume that different couples and individuals are on time or late independently of one another. Let X = the number of people who arrive late for the seminar.
(a) Determine the probability mass function of X. [Hint: label the three couples #1, #2, and #3 and the two individuals #4 and #5.] (Round your answers to four decimal places.)
| x | P(X = x) |
| 0 | |
| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 |
(b) Obtain the cumulative distribution function of X.
(Round your answers to four decimal places.)
| x | F(x) |
| 0 | |
| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 |
Use the cumulative distribution function of X to
calculate
P(2 ≤ X ≤ 7).
(Round your answer to four decimal places.)
P(2 ≤ X ≤ 7) =
In: Math
Workshop: SQL Simple Retrieval For this workshop, you are to submit the SQL statements. Do not submit the output produced by running the query. However, you may wish to examine the output to ensure the correctness of the query. When writing a query, do not rely exclusively on the current content of the database. Remember that when working with a real-world company’s database there can be far too many rows to allow you to visually examine the content of a table and validate your query. The following exercises all pertain to the FACULTY table. This table has the following columns: FNO, FNAME, FADDR, FHIRE_DATE, FNUM_DEP, FSALARY, and FDEPT. The table is owned by the user STUDENT.
1. Display the entire FACULTY table.
2. Display all information about any employee whose yearly salary is less than $40000.
3. Display all information about any employee who is employed by the Computer and Information Systems (CIS) Department.
4. Display the department, faculty number, and name of all faculty members.
5. Display the name and date of hire for any faculty member whose department alphabetically precedes THEO.
6. Display the departments to which faculty are assigned. Do not show duplicate values.
7. Display the name and salary of any employee earning less than $36000. Present the result set such that the highest paid employee is listed first, the second highest is listed next, and so on - that is, show the result with salaries in descending sequence.
8. Display the department, employee name, and salary for every employee. The output should be presented such that rows are arranged by salary within department. (Employees assigned to the same department will appear next to each other, but these rows will be sorted by salary.)
In: Computer Science
Problem 3: Celiac Disease
Celiac disease is an autoimmune disorder where the ingestion of gluten leads to damage in the small intestine. Left untreated, celiac disease can lead to the development of other autoimmune disorders like Type I diabetes, multiple sclerosis, anemia, and osteoporosis. Generally, the later in life that celiac disease is diagnosed, the higher the chances of developing another autoimmune condition. In fact, it is known that 34% of individuals with celiac disease that is first diagnosed when they are 21 years of age or older will develop another autoimmune condition. Suppose we are interested in the number of individuals that develop another autoimmune disorder in a random sample of 9 people with celiac disease first diagnosed after they turn 21. Assume these people are independent of each other.
In: Statistics and Probability
5 solved examples for (differential equation in fluid dynamics )
*the exampls (proplems) should be have differential equation in Operative of the question (It is preferable to be for the highest order)
and The answer should be a solution to these differential equations
In: Physics
In: Biology
In splitting diagram of trigonal bipyramid geometry, why does z2 orbital have the highest energy and why does the energy decrease by this order?
z2 > xy,x2-y2 > xz,yz
In: Chemistry
Which has the highest boiling point?
A) 0.1 M Na2SO4
B) 0.1 M glucose, C6H12O6
C) 0.1 M MgCl2
D) 0.1 M Al(NO3)3
In: Chemistry
An XRD experiment was performed Cu Ka radiation of wavelength 0.154 nm on an FCC crystal with lattice constant = 3.61 Å. What are the Miller indices of the planes with lowest and highest Bragg angles?
In: Physics