Suppose the number of TV's in a household has a binomial distribution with parameters n = 17, and p = 80 %. Find the probability of a household having: A. 12 or 14 TV's B. 12 or fewer TV's C. 15 or more TV's D. Fewer than 14 TV's C. more than 1 Tv's
In: Statistics and Probability
Suppose the number of cars in a household has a binomial distribution with parameters n = 12, and p = 10 %. Find the probability of a household having: (a) 1 or 5 cars (b) 3 or fewer cars (c) 9 or more cars (d) fewer than 5 cars (e) more than 3 cars
In: Statistics and Probability
python
class Node():
def __init__(self, value):
pass
class PostScript():
def __init__(self):
pass
def push(self, value):
pass
def pop(self):
return None
def peek(self):
pass
def is_empty(self):
pass
def stack(self):
pass
def exch(self):
pass
def index(self):
pass
def clear(self):
pass
def dup(self):
pass
def equal(self):
pass
def depth(self):
pass
stack = PostScript()
def decode(command_list):
for object in command_list:
if object == '=':
stack.equal()
elif object == 'count':
stack.depth()
elif object == 'clear':
stack.clear()
elif object == 'dup':
stack.dup()
elif object == 'exch':
stack.exch()
elif object == 'index':
stack.index()
elif object == 'pop':
stack.pop()
elif object == 'stack':
stack.stack()
else:
stack.push(object)
command = input()
command_list = command.split()
decode(command_list)
For this assignment you are to implement a PostScript command
interpreter using a Stack. You must implement the stack using a
singly-linked list. Solutions that use a data structure other than
a singly-linked list will received no
credit.
The interpreter must read and execute a string of PostScript
commands based on the following definitions:
1. =
objn objn-1 … obj1 = : objn-1 … obj1
This command removes the topmost object form the stack and
prints it.
In: Computer Science
1)Find the permutation and combination of the letters a, b, c, d taking 2 at a time.
Verify your answers with the permutation & combination formula.2)
2.An urn contains 10 marbles. 3 blues, 4 yellow and 3 red marbles. 6 marbles is selected at random. Find the probability of picking 1 blue, 3 yellow marbles and 2 red ones.
3) A computer operator has to issue passwords made up of a letter followed by two digits. How many passwords are possible? Give two random passwords
4) In how many ways can you mark a 5-question test True / False? Give a random selection
5) A recent U.S survey shows that, the probability of living in California is 12%, the probability
of being Hispanic is 11% and the probability of being Hispanic and living in California is 4%.
Let H represents the events of “Being Hispanic” and L for living in CA. Evaluate i) P(H/L), ii)P(H U L)
6) A single card is picked at random. Find the probability of picking a red card or a 10.
7) a)Define mutually vs not mutually exclusive events give an example of two events that are mutually exclusive and two that are not.
b)Define independent events and give an example of an independent event and a dependent one.
c)Define independent events and give an example of an independent event and a dependent one.
8) a)A coin is tossed three times, use a tree diagram to construct all the possible outcomes.
8b)The odds-maker give the Yankees a 10 to 1 shot of winning the 2020 World Series.
What is the probability that the Yankees will win the 2020 World Series?
9)In Spring valley, NY about 56% of days in a year are cloudy.
Find the mean,
variance and standard deviation for the number of cloudy days
during the month of June
10) The probability that Yankees will 2020 world series is 20%.
Find the odds in favor that they will in fact win the 2020 world series? .20 to 1-.20 which reduces to 1 to 4 odds.
11. A sample task was given to 150 elementary school children.
The following table includes the times in minute it takes to complete the task.
|
minutes |
# of kids |
|
1 2 3 4 5 |
24 33 42 30 21 ----------- Total= 150 |
a) Construct a probability distribution for the random variable x
b) Graph the distribution using a histogram (Times in minutes VS probability)
c) Verify that the probability is in fact a probability distribution.
d) Find the mean, the variance and the standard deviation
12) The table shows the number of male and female students enrolled in nursing at University of Oklahoma Health Sciences center for a recent semester.
A student is selected at random. Find the probability of each event.
Nursing Majors Non Nursing Majors Total
Males 94 1104 1198
Females 725 1682 2407
Total 819 2786 3605
Calculate the probability of a) choosing a male or a nursing major is
b) The student is a female or not a nursing major. c)The student is a female given that nursing major d) Calculate P(M U F), P( M n F)
15)The probability that a person in the United States has type A+ blood is 31%. Three people in the United States are selected at random. Find the probability that
a) All three has blood type A+ b) None of the three has blood type A+
c) At least one of the three has blood type A+. d)Which of the events can be considered unusual? Explain
In: Statistics and Probability
1)
a) A certain kind of light bulb has a 8.5 percent probability of being defective. A store receives 54 light bulbs of this kind. What is the expected value (or mean value) of the number of light bulbs that are expected to be defective?
b) In a certain town, 19 % of the population develop lung cancer. If 25 % of the population are smokers and 85% of those developing lung cancer are smokers, what is the probability that a smoker in this town will develop lung cancer? Write your answer as a decimal accurate to three decimal places.
c) Suppose that 9.6 % of the items produced by a fifth factory are defective. If 6 items are chosen at random from the fifth factory, what is the expected value (or mean value) for the number of defective items? Write your answer as a decimal accurate to three decimal places.
d) Suppose that 5.1 % of the items produced by a fourth factory are defective. If 5 items are chosen at random from the fourth factory, what is the probability that at least two of the items are defective? Write your answer as a decimal accurate to three decimal places.
e) Suppose that 8.8 % of the items produced by a third factory are defective. If 5 items are chosen at random from the third factory, what is the probability that exactly two of the items are defective? Write your answer as a decimal accurate to three decimal places.
2)
a) Suppose that 5.7 % of the items produced by a second factory are defective. If 5 items are chosen at random from the second factory, what is the probability that exactly one of the items is defective? Write your answer as a decimal accurate to three decimal places.
b) Suppose that 3.4 % of the items produced by a factory are defective. If 5 items are chosen at random, what is the probability that none of the items are defective? Write your answer as a decimal accurate to three decimal places.
c) A box contains 10 white marbles and 7 black marbles. Suppose we randomly draw a marble from the box, replace it, and then randomly draw another marble from the box. (This means that we might observe the same marble twice). What is the probability that both the marbles are white? Write your answer as a decimal accurate to three decimal places.
d) A drawer contains 9 white socks and 7 black socks. Two different socks are selected from the drawer at random. What is the probability that both of the selected socks are white? Write your answer as a decimal accurate to three decimal places.
In: Statistics and Probability
Question 4. Your friend Joanna is running for class president and has the support of 55% of the total student body. You poll a group of N students (N=50 or N=150) and compute the total number of students who state that they will vote for Joanna. For samples of size N=50 or N=150, use R to simulate 10,000 independent samples and record the total votes for Joanna in each sample. For each sample, compute a Z-score test statistic for the specified null hypothesis and α given below.
Compute the following (a-f) for both N=50 and N=150 separately.
a) Plot a histogram of the resulting Z-score distribution under H0: p=0.55. Based on a rejection region of |Z|>1.96, does the simulated Type I error probability match the expected Type I error probability (α).
b) Plot a histogram of the resulting Z-score distribution under H0: p=0.6. Based on a rejection region of |Z|>1.96, does the simulated Type II error probability match the expected Type II error probability. You will need to compute the expected Type II error probability (β).
c) Plot a histogram of the resulting Z-score distribution under H0: p=0.65. Based on a rejection region of |Z|>1.96, does the simulated Type II error probability match the expected Type II error probability. You will need to compute the expected Type II error probability (β).
d) Plot a histogram of the resulting Z-score distribution under H0: p=0.55. Based on a rejection region of |Z|>2.575, does the simulated Type I error probability match the expected Type I error probability (α).
e) Plot a histogram of the resulting Z-score distribution under H0: p=0.6. Based on a rejection region of |Z|>2.575, does the simulated Type II error probability match the expected Type II error probability. You will need to compute the expected Type II error probability (β).
f) Plot a histogram of the resulting Z-score distribution under H0: p=0.65. Based on a rejection region of |Z|>2.575, does the simulated Type II error probability match the expected Type II error probability. You will need to compute the expected Type II error probability (β).
g) What factors (N, α, |?0 − ??|) (if any) influence the Type I error probability? Explain.
h) What factors (N, α, |?0 − ??|) (if any) influence the Type II error probability? Explain.
In: Statistics and Probability
Question 4. Your friend Joanna is running for class president and has the support of 55% of the total student body. You poll a group of N students (N=50 or N=150) and compute the total number of students who state that they will vote for Joanna. For samples of size N=50 or N=150, use R to simulate 10,000 independent samples and record the total votes for Joanna in each sample. For each sample, compute a Z-score test statistic for the specified null hypothesis and α given below.
Compute the following (a-f) for both N=50 and N=150 separately.
a) Plot a histogram of the resulting Z-score distribution under H0: p=0.55. Based on a rejection region of |Z|>1.96, does the simulated Type I error probability match the expected Type I error probability (α).
b) Plot a histogram of the resulting Z-score distribution under H0: p=0.6. Based on a rejection region of |Z|>1.96, does the simulated Type II error probability match the expected Type II error probability. You will need to compute the expected Type II error probability (β).
c) Plot a histogram of the resulting Z-score distribution under H0: p=0.65. Based on a rejection region of |Z|>1.96, does the simulated Type II error probability match the expected Type II error probability. You will need to compute the expected Type II error probability (β).
d) Plot a histogram of the resulting Z-score distribution under H0: p=0.55. Based on a rejection region of |Z|>2.575, does the simulated Type I error probability match the expected Type I error probability (α).
e) Plot a histogram of the resulting Z-score distribution under H0: p=0.6. Based on a rejection region of |Z|>2.575, does the simulated Type II error probability match the expected Type II error probability. You will need to compute the expected Type II error probability (β).
f) Plot a histogram of the resulting Z-score distribution under H0: p=0.65. Based on a rejection region of |Z|>2.575, does the simulated Type II error probability match the expected Type II error probability. You will need to compute the expected Type II error probability (β).
g) What factors (N, α, |?0−??|) (if any) influence the Type I error probability? Explain.
h) What factors (N, α, |?0−??|) (if any) influence the Type II error probability? Explain.
In: Statistics and Probability
The following algorithm is widely used for checking whether a credit or debit card number has been entered correctly on a website. It doesn't guarantee that the credit card number belongs to a valid card, but it rules out numbers which are definitely not valid. Here are the steps:
Example
Here is a worked example using the long number "4916592478445662".
| longNumber index | longNumber value at index | values at even indexes multiplied by 2 | Adjusted to a single digit by subtracting 9 |
|---|---|---|---|
| 0 | 4 | 8 | 8 |
| 1 | 9 | … | 9 |
| 2 | 1 | 2 | 2 |
| 3 | 6 | … | 6 |
| 4 | 5 | 10 | 1 |
| 5 | 9 | … | 9 |
| 6 | 2 | 4 | 4 |
| 7 | 4 | … | 4 |
| 8 | 7 | 14 | 5 |
| 9 | 8 | … | 8 |
| 10 | 4 | 8 | 8 |
| 11 | 4 | … | 4 |
| 12 | 5 | 10 | 1 |
| 13 | 6 | … | 6 |
| 14 | 6 | 12 | 3 |
S = 8 + 9 + 2 + 6 + 1 + 9 + 4 + 4 + 5 + 8 + 8 + 4 + 1 + 6 + 3 = 78
a- Write a public method called isCorrectLength() that takes no arguments and returns the boolean value true if the length of longNumber is 16 and false otherwise.
b - Write a public method firstFifteen() that returns a String consisting of the first fifteen characters in the longNumber.
c) - write a public method calculateCheckNumber() to find S and then use the expression S/10 * 10 + 10 – S to find C. The method should first create a string omitting the last digit of the longNumber and then find S by iterating through this string. (You may choose to do a separate iteration for the odd and even indexes, or you could do both in a single loop.)
In: Computer Science
java program plz number = 308.2 number = 14.9 number = 7.4 number = 2.8 number = 3.9 number = 4.7 number = -15.4 number = 2.8 Sum = 329.3
In: Computer Science
Draw the pic
a) What is the probability that exactly 5 specials will be sold to this set of customers?
b) Determine the expected number of specials that will be sold.
c) Calculate the standard deviation for this probability distribution.
2) It is known that at major sporting events only 60% of persons that use the washroom during a break in the action will wash their hands. Assuming that you had observed 14 people leave the washroom, answer the following:
a) The probability that exactly 4 of these people have washed their hands.
b) The probability that more than 10 of these people have washed their hands.
c) The probability that at least 4 of these people will have washed their hands.
d) The expected value for this probability distribution.
3) Based on years of historical data, the salary research firm, HR Pufnstuf, states that the annual salary for a Marketing Manager working on Living Island follows a normal distribution with a mean of $62,000 and a standard deviation of $8,000. Given this information determine the following:
b) The probability that a Living Island Marketing Manager’s annual salary would be between $60,000 and $75,000.
4) It is known that the average age of major league baseball players is 28.3 years with a population standard deviation of 2.8 years. Determine the probability that the average age of 36 randomly selected National League baseball players is less than 27 years of age?
In: Statistics and Probability