Questions
Flip all 3 coins 10 times. Each flip place a tally mark next to the number...

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...

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:

  1. 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...

  2. 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.

  3. 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.

  4. 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.

  5. 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

  1. Once4validcardentrieshavebeenentered,the4cardsshouldbedisplayedlikethis:

    JC, 6S, 9D, 5H

  2. 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.

  3. 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...

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(A1A2) = 0.07, P(A1A3) = 0.05, P(A2A3) = 0.08, P(A1A2A3) = 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(A2A3 | 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(A2A3 | 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(A1A2A3 | A1A2A3) =

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...

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...

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.

  1. Check if this situation fits the binomial setting. Write four complete sentences addressing each requirement in one sentence each.
  2. Assuming this situation is a binomial experiment, build the probability distribution in table form in StatCrunch. There are two ways to do this. You may use Data à Compute à Expression and choose the function dbinom. This method relies on you entering the values of the random variable in the first column of your data table. The other way to do this is to use the binomial calculator and calculate the probability of each of the values of the random variable from X = 0 to X = 9. You may present this table horizontally or vertically and leave the probabilities unrounded.

  1. Calculate the probability that exactly three people in the sample develop another autoimmune disorder using the StatCrunch binomial calculator. Copy this image from StatCrunch into your document. Then, once you obtain your answer, write one sentence to explain what the probability means in context of the question.

  1. Calculate the probability that no more than 6 people in the sample develop another autoimmune disorder using the StatCrunch binomial calculator. Again, provide a StatCrunch binomial calculator graph to display your answer. Then, once you obtain your answer, write one sentence to explain what the probability means in context of the question.
  1. Calculate the probability that between 2 and 5 people in the sample (inclusive) develop another autoimmune disorder. Show your work using the probability distribution you built in part (b) to answer this question. Then, verify it with a StatCrunch binomial calculator graph and include this image in your document as well. Finally, once you obtain your answer, write one sentence to explain what the probability means in context of the question.

  1. Calculate the mean and standard deviation of this probability distribution. Show your work using the binomial mean and standard deviation formulas and provide your answers in your document. (No need to use StatCrunch for this part).

In: Statistics and Probability

5 solved examples for (differential equation in fluid dynamics )

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

Which geological period saw the highest diversity of fishes? List the three main groups of armoured...

Which geological period saw the highest diversity of fishes? List the three main groups of armoured fishes that coexisted and radiated in this period and their main characteristics. Provide some possible explanations for their extinction.

In: Biology

In splitting diagram of trigonal bipyramid geometry, why does z2 orbital have the highest energy and...

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)...

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...

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