You need to combine some small pieces of chocolate (1 ounce) and
some large pieces of chocolate (5 ounces) to make a goal. Assuming
you always use as many large pieces as possible, complete the
function "makeChocolate" which returns the number of small pieces
that you will use. Return -1 if it is not possible. Be sure to
carefully test your code before submitting it. Make sure to answer
in python coding for full credit.
For example, makeChocolate(4,1,9) returns 4 because you use 1 large
piece and 4 small pieces to get 9 ounces.
makeChocolate(4,1,10) returns -1 because 1 large and 4 small pieces
are only 9 ounces, not enough to make 10 ounces.
makeChocolate(3,2,10) returns 0 because you would use 2 large
pieces and 0 small pieces to make 10 ounces.
In: Computer Science
Using the following dataset, conduct a one-way ANOVA and post-hoc comparisons if necessary. A real estate developer is considering investing in a shopping mall on the outskirts of Atlanta, GA. Three parcels of land are being evaluated. Of particular importance is the income in the area surrounding the proposed mall. A random sample of four families is selected near each proposed mall. The following are the sample results. At the 0.05 significance level, can the developer conclude there is a difference in the mean income?
|
Southwyck Area (in $1,000’s) (Group 1) |
Franklin Park (in $1,000’s) (Group 2) |
Old Orchard (in $1,000’s) (Group 3) |
|
64 |
74 |
75 |
|
68 |
71 |
80 |
|
70 |
69 |
76 |
|
60 |
70 |
78 |
1. (2 points) What is the F-value for the one-way ANOVA test:
a. 18.14
b. 14.18
c. 138.25
d. None of the above
2. (2 points) What is the p-value:
a. 0.0071
b. 14.18
c. 0.0017
d. None of the above
3. (2 points) What is the mean for Group 1:
a. 65.5
b. 71.0
c. 77.3
d. None of the above
4. (2 points) What is the mean for Group 2:
a. 65.5
b. 71.0
c. 77.3
d. None of the above
5. (2 points) What is the mean for Group 3:
a. 65.5
b. 71.0
c. 77.3
d. None of the above
6. (2 points) Is there a difference mean income between at least two of the areas?
a) TRUE b) FALSE
7. (2 points) Using the results of the Tukey test (alpha = 0.05), is Group 1 significantly different from Group 2?
a) TRUE b) FALSE
8. (2 points) Using the results of the Tukey test (alpha = 0.05), is Group 2 significantly different from Group 3?
a) TRUE b) FALSE
9. (2 points) Using the results of the Tukey test (alpha = 0.05), is Group 1 significantly different from Group 3?
a) TRUE b) FALSE
Using the following dataset, conduct a one-way ANOVA and post-hoc comparisons if necessary. The following is sample information. Test the hypothesis that all treatment means are equal at the 0.05 significance level.
|
Treatment 1 (Group 1) |
Treatment 2 (Group 2) |
Treatment 3 (Group 3) |
|
8 |
3 |
3 |
|
6 |
2 |
4 |
|
10 |
4 |
5 |
|
9 |
3 |
4 |
10. (2 points) What is the F-value for the one-way ANOVA test:
a. 21.94
b. 14.18
c. 31.083
d. None of the above
11. (2 points) What is the p-value:
a. 0.01
b. 0.05
c. 0.03
d. None of the above
12. (2 points) What is the mean for Group 1:
a. 3.0
b. 4.0
c. 5.1
d. None of the above
13. (2 points) What is the mean for Group 2:
a. 3.0
b. 4.0
c. 5.1
d. None of the above
14. (2 points) What is the mean for Group 3:
a. 3.0
b. 4.0
c. 5.1
d. None of the above
15. (2 points) Is there a difference mean income between at least two of the treatment groups?
a) TRUE b) FALSE
16. (2 points) Using the results of the Tukey test (alpha = 0.05), is Group 1 significantly different from Group 2?
a) TRUE b) FALSE
17. (2 points) Using the results of the Tukey test (alpha = 0.05), is Group 2 significantly different from Group 3?
a) TRUE b) FALSE
18. (2 points) Using the results of the Tukey test (alpha = 0.05), is Group 1 significantly different from Group 3?
a) TRUE b) FALSE
Use the following dataset for the next four questions:
X: 5 3 6 3 4 4 6 8
Y: 13 15 7 12 13 11 9 5
19. (3 points) What is the Pearson correlation value r(x,y)? r = _________
a. -0.98
b. -0.89
c. 0.89
d. None of the above
20. (3 points) Is the “r” signifcant at alpha = 0.05?
a) TRUE
b) FALSE
21. (4 points) Identify the regression equation below
a. Y = 19.12 + 1.74(X)
b. Y = 19.12 – 1.74(X)
c. Y = -4.802 – 1.74(X)
d. None of the above
22. (3 points) Calculate the value of Y when X is 7:
a. 9.64
b. 4.96
c. 6.94
d. None of the above
Mr. James McWhinney, president of Daniel-James Financial Services, believes there is a relationship between the number of client contacts and the dollar amount of sales. To document this assertion, Mr. McWhinney gathered the following sample information. The X column indicates the number of client contacts last month, and the Y column shows the value of sales (in thousands $) last month for each client sampled.
|
Number of Contacts (X) |
Sales (in thousands $) Y |
|
14 |
24 |
|
12 |
14 |
|
20 |
28 |
|
16 |
30 |
|
46 |
80 |
|
23 |
30 |
|
48 |
90 |
|
50 |
85 |
|
55 |
120 |
|
50 |
110 |
a. Sales = -12.2 + 2.19(Contacts)
b. Sales = 2.19 – 12.2(Contacts)
c. Sales = 6.56 + 0.176(Contacts)
d. None of the above
24. (3 points) Calculate the estimated sales if 40 contacts are made:
a. Approximately 57
b. Approximately 75
c. Approximately 85
d. Approximately 105
In: Statistics and Probability
Assume that the following variables have been declared:
String a = “Ready, Set, Go!”;
String b = a.substring(5, 10);
char b1 = b.charAt(2);
Evaluate the following expression:
1. Character.isLowerCase(b1)
2. b1 + 5
3. b + 5
4. Character.toLowerCase(b1)
5. a.charAt(2 + a.indexOf(“e”))
In: Computer Science
The following items would be included in cash and cash equivalents:
1. 2% investment in common shares public company.
2. 2% investment in common shares private company.
3. 60-day investment certificates.
4. Bank overdraft.
5. Commercial paper.
Required:
Identify whether each statement is true or false.
In: Computer Science
In: Statistics and Probability
In C++ write an application that calculates total retail values for 5 different shoes entered by the user.
Shoe 1 $15.50
Shoe 2 $27.30
Shoe 3 $34.50
Shoe 4 $42.11
Shoe 5 $54.25
Application must read shoe number and quantity sold for each
transaction stdin, compute the total value of that sale, and add
the value of that sale to a grand total for that shoe. After all
data has been entered, display the total value of each of the five
shoe items. Must have driver and a class, must use a switch
structure to which shoes sales to update, must use a sentinel
controlled loop to determine when the program should stop looping
and display result.
Data members
Product price
Total sales for product(in dollars)
Member Functions
One 1 argument constructor(representing the shoe price), set the
value of the data member using this argument. Getters and setters
for data member, and updateTotalSales method(uses one parameter
representing quantity sold and does not return a value) . must use
getter and setter methods to access the fields do not access them
directly. It computes the total value of the current sale by
multiplying the argument passed by the shoess price. It updates the
shoes total Sales data member by adding the value calculated in the
previous step to the shoes existing totalSales. Must use getter and
setter functions. Do not access the data members directly.
Main function
Instantiate 5 separate objects of the class Shoe, passing the
appropriate argument to each constructor. The Shoe class
constructor requires the price of that instance of the shoe. The
prices can be hard coded numbers.
Using Sentinel controlled loop
1. Read the shoe number and the quantity sold for one
transaction.
2. Use a switch statement to determine which Shoe
objects sales to update.
3. Call the appropriate Shoe objects updateTotalSales
function.
4. Continue loop until user enters 0 for the shoe
number.
5. After the loop is complete display each shoe objects
total sales, including the dollar sign, two decimal places with a
field width of 10.
Sample run
Shoe number: 2
Quantity sold: 4
Shoe number: 1
Quantity sold: 3
Shoe Number: 5
Quantity sold: 2
Shoe number: 1
Quantity sold: 2
Shoe number: 5
Quantity sold: 3
Shoe Number: 4
Quantity sold: 2
Shoe Number: 0
Total Sales
Shoe 1 : $77.50
Shoe 2: $109.20
Shoe 3: $0
Shoe 4: $84.22
Shoe 5: $271.25
In: Computer Science
1. A really bad carton of 18 eggs contains 7 spoiled eggs. An unsuspecting chef picks 4 eggs at random for this "Mega-Omelet Surprise". Let x be the number of unspoiled eggs in a sample of 4 eggs. Find the probability that the number of unspoiled eggs among the 4 selected is exactly 4.Round your answer to the nearest 4 decimal places.
2. Let x be a continuous random variable that has a normal distribution with a mean of 25 and a standard deviation of 5. Find the probability, rounded to the nearest 4 decimal places, that x is less than or equal to 20.
In: Statistics and Probability
What is the payback period for the investment project that has the following cash flows?
Year Cash Flows
0 -65,209
1 24,853
2 27,977
3 23,774
4 25,436
In: Finance
In: Finance
compare and contrast photosystems 1 and 2
how many molecules of ATP does a cell ultimately gain when 4 molecules of glucose are broken down via glycolysis. explain.
In: Biology