Questions
The directions say to "create two methods:

The directions say to "create two methods:

-enrollStudent (Student newStudent) which adds newStudent into the enrolled list and increment numOfEnroll by 1, if the section is full, print out an error message and no change with numOfEnroll.

-removeStudent (String studentId) which removes the student with studentId from the enrolled list and decrement numOfEnrollby 1, if the target student is not found in the enrolled list, print out an error message and no change with numOfEnroll."

 

In: Computer Science

(13 marks) Audrey and Diana go fishing at the Lyndon Fishing Pond. Upon arrival the owner...

Audrey and Diana go fishing at the Lyndon Fishing Pond. Upon arrival the owner informs them that the pond is stocked with an infinite number of independent fish, and that a typical fisher catches fish at a Poisson rate of 2 fish per hour. There are 8 other people fishing there that day. Diana has the same skill level as a typical fisher but Audrey catches on average twice as many fish as a typical fisher.

(a) (2) Find the mean and variance of the total number of fish caught over 6 hours.

For the rest of the question, assume that 100 fish were caught that day.
(b) (3) Show that we have the following probabilities. Use those rounded probabilities in parts b), c) and d):
i. The probability a fish was caught by Audrey is 0.182
ii. The probability a fish was caught by Diana is 0.091
iii. The probability a fish was caught by someone else is 0.727

(c) (2) Find the probability that Audrey catches 15 fish and Diana catches 15 fish

(d) (2) Find the probability that Audrey and Diana catch 30 fish together

(e) (2) Given that Audrey catches 15 fish, find the probability that Diana catches 15 fish

(f) (2) Explain logically the difference between the probabilities in (c), (d), and (e)

In: Statistics and Probability

The prevalence of a disease is the fraction of individuals who are afflicted, i.e., the ratio...

The prevalence of a disease is the fraction of individuals who are afflicted, i.e., the ratio of the number of cases to the whole population. The incidence of a disease is the fraction of individuals who become infected in one time period, usually one year. This terminology is usually reserved for chronic diseases such as diabetes or AIDS or cardiovascular disease, not for seasonal flu or coronavirus. The prevalence is equal to the incidence times the mean survival time. Thus a disease that is immediately and always fatal has zero prevalence. '

A biochemical test designed to detect a specific genetic mutation has a sensitivity of 95% and a specificity of 90%. A sensitivity of 95% means that an individual who has the defect (a carrier) will test positive with probability 0.95, and negative with probability 0.05. A specificity of 90% means that a non-carrier will test negative with probability 0.90, and positive with probability 0.10. The prevalence of the defect in the population is 1%.

Part a: Ten thousand individuals randomly selected from this population are tested. Calculate the expected number of individuals in each cell of the following table.

xxxxxx Carrier xxxx  Non-carrier xxxxx Total

Test +

Test −

Total xxxxxxxxxxxxxxxxxxxxxx 10000

Part b: An individual from this population tests positive. What is the probability that he/she is a carrier?

Part c: An individual from this population tests negative. What is the probability that he/she is a non-carrier?

In: Statistics and Probability

(13 marks) Audrey and Diana go fishing at the Lyndon Fishing Pond. Upon arrival the owner...

Audrey and Diana go fishing at the Lyndon Fishing Pond. Upon arrival the owner informs them that the pond is stocked with an infinite number of independent fish, and that a typical fisher catches fish at a Poisson rate of 2 fish per hour. There are 10 other people fishing there that day. Diana has the same skill level as a typical fisher but Audrey catches on average twice as many fish as a typical fisher.

(a) (2) Find the mean and variance of the total number of fish caught over 5 hours.

For the rest of the question, assume that 90 fish were caught that day.
(b) (3) Show that we have the following probabilities. Use those rounded probabilities in parts b), c) and d):
i. The probability a fish was caught by Audrey is 0.154
ii. The probability a fish was caught by Diana is 0.077
iii. The probability a fish was caught by someone else is 0.769

(c) (2) Find the probability that Audrey catches 15 fish and Diana catches 15 fish

(d) (2) Find the probability that Audrey and Diana catch 30 fish together

(e) (2) Given that Audrey catches 15 fish, find the probability that Diana catches 15 fish

(f) (2) Explain logically the difference between the probabilities in (c), (d), and (e)

In: Statistics and Probability

2. Suppose a bin contains 20 manufactured parts and 4 of them are defective. Pick 3...

2. Suppose a bin contains 20 manufactured parts and 4 of them are defective. Pick 3 parts randomly from the bin, with replacement and let X be the number of defective parts picked. Pick parts repeatedly from the bin, with replacement, and let Y be the number of picks until the first defective part is observed. Find the probability mass functions for X and Y .

3. Suppose a bin contains 20 manufactured parts and 4 of them are defective. Pick 3 parts randomly from the bin, without replacement and let X be the number of defective parts picked. Replace the 3 parts you just picked. Then pick parts repeatedly from the bin, without replacement, and let Y be the number of picks until the first defective part is observed. Find the probability mass functions for X and Y

In: Statistics and Probability

List the characteristics of a multinomial experiment. (Select all that apply.) The number of successes is...

List the characteristics of a multinomial experiment. (Select all that apply.)

The number of successes is evenly distributed over all k categories.

We are interested in x, the number of events that occur in a period of time or space.

The trials are independent.

The experiment consists of n identical trials.

Its mean is 0 and its standard deviation is 1.

The outcome of each trial falls into one of k categories.

The experiment contains M successes and NM failures.

The probability that the outcome of a single trial falls into a particular category remains constant from trial to trial.

The probability that the outcome of a single trial falls between two categories is equal to the area under the curve between those categories.

We are interested in x, the number of successes observed during the n trials.

The experimenter counts the observed number of outcomes in each category.

Each trial results in one of only two possible outcomes.

In: Math

Done in C language using mobaxterm if you can but use basic C This program is...

Done in C language using mobaxterm if you can but use basic C

This program is broken up into three different functions of insert, delete, and main. This program implements a queue of individual characters in a circular list using only a single pointer to the circular list; separate pointers to the front and rear elements of the queue are not used.

  1. The linked list must be circular.  
      
  2. The insert and remove operations must both be O(1)
      
  3. You may use only one pointer into the queue from the outside; you may not have separate, named pointers for the front and the rear.

Test Cases:

  1. Try to remove – thus making sure that the queue was initialized properly (i.e., empty)
  2. Insert 'A', then do a remove, then another remove – thus making sure that you can empty the queue
  3. Insert 'B', then 'F', do a remove, then insert 'D', then 'C', then do four removes (the last one should fail, of course). This test case will make sure your queue is FIFO – your last four removes should come out 'F', 'D', 'C', and then "cannot remove from an empty queue"

In: Computer Science

#include <stdio.h> #include <stdlib.h> int play_game(int *); // Returns 0 if player won, 1 if the...

#include <stdio.h>

#include <stdlib.h>

int play_game(int *); // Returns 0 if player won, 1 if the computer won, 2 if there is a tie, and -1 if the player decides to quit

int menu(int *); // Displays choices to user // Receives score array

int main() { srand(42); // Seeding Random with 42

int score[3]; // Array keeping Player, Computer, and Tie Scores

score [0] = 0; // Player - initialized to Zero

score [1] = 0; // Computer - initialized to Zero

score [2] = 0; // Tie - initialized to Zero

int winner=0; // Winner index of

printf("ROCK PAPER SCISSORS!\n\n");

while(winner >=0) // If Winner == -1 -> the game stops {

winner = play_game(score); // Plays the game

. if(winner >=0) // If a value to not stop the game comes in.

score[winner]++; // Increment score counter }

printf("GOOD BYE!\n");

return 0; }

please help with the two functions listed on top.

need to know

int menu(int *): Receives: integer array score Returns: Menu number for Rock, Paper, Scissors, or Exit. Returns -1 for any other number than applicable menu choice Grading: 1) Displays “ROCK PAPER SCISSORS!” at the top of the menu 2) Displays the current score between the player and the computer (including ties) 3) Displays choice numbers for Rock, Paper, Scissors, and Exit. 4) Asks for a choice – If improper choice is given (alpha-numeric and wrong number), asks for another choice 5) Console Display is organized and easily read 6) Code is organized and easily read (Comments where needed) HINT: Use of a switch statement makes the code a little easier to read.

int play_game(int *): Receives: integer array score Returns: an index of score to be incremented. If the player wins, returns 0. If the computer wins, returns 1. If there is a tie, returns 2. Grading: 1) The computer choice is randomly generated between 3 numbers using rand(). 2) Displays BOTH the User choice and the Computer Choice 3) Displays whether the result is a win, loss, or tie for the User. 4) Displays the following statements depending on what was played by the User and Computer  “ROCK CRUSHES SCISSORS!”  “SCISSORS CUT PAPER!”  “PAPER COVERS ROCK!”  “TIE – BAZINGA!” 5) Returns 0 if the User won, 1 if the Computer won, and 2 if the User and Computer Tied.

In: Computer Science

Use the probability distribution to find probabilities in parts​ (a) through​ (c). The probability distribution of...

Use the probability distribution to find probabilities in parts​ (a) through​ (c).

The probability distribution of number of dogs per household in a small town

Dogs

0

1

2

3

4

5

Households

0.6730.673

0.2010.201

0.0760.076

0.0250.025

0.0170.017

0.0080.008

​(a) Find the probability of randomly selecting a household that has fewer than two dogs.

0.8740.874  

​(Round to three decimal places as​ needed.)

​(b) Find the probability of randomly selecting a household that has at least one dog.

0.3270.327

​ (Round to three decimal places as​ needed.)

​(c) Find the probability of randomly selecting a household that has between one and three​ dogs, inclusive.

nothing

​ (Round to three decimal places as​ needed.)

In: Statistics and Probability

You are very bored and are guessing how many fingers your friend is holding behind her...

You are very bored and are guessing how many fingers your friend is holding behind her back on just one hand (so your answers are 1, 2, 3, 4 or 5). You repeat this 4 times.  Find the probability of each scenario below. Keep in mind that this is a computer graded question, so be sure you are writing ONLY the solution, rounded to 4 decimal places, in the space provided.

a. The probability that you correctly guess the number of fingers 4 times in a row.

b. The probability that you guess incorrectly 4 times in a row.

c. The probability that you are wrong at least once.

d. The probability that the first time you are correct is on the 4th guess.

In: Statistics and Probability