Here are the returns on two stocks.
|
Digital Cheese |
Executive Fruit |
||||||
|
January |
+17 |
+7 |
|||||
|
February |
−3 |
+2 |
|||||
|
March |
+5 |
+4 |
|||||
|
April |
+7 |
+15 |
|||||
|
May |
−4 |
+3 |
|||||
|
June |
+3 |
+5 |
|||||
|
July |
−2 |
−3 |
|||||
|
August |
−8 |
−2 |
|||||
Required:
a-1. Calculate the variance and standard deviation of each stock.
a-2. Which stock is riskier if held on its own?
b. Now calculate the returns in each month of a portfolio that invests an equal amount each month in the two stocks.
c. Is the variance more or less than halfway between the variance of the two individual
In: Finance
A coin is tossed three times. An outcome is represented by a string of the sort HTT (meaning a head on the first toss, followed by two tails). The
8 outcomes are listed in the table below. Note that each outcome has the same probability.
For each of the three events in the table, check the outcome(s) that are contained in the event. Then, in the last column, enter the probability of the event.
|
||||||||||||||||||||||||||||||||||||||||||||||||
In: Statistics and Probability
Having some trouble with this python question. An answer would be greatly appreciated!
#Write a function called are_anagrams. The function should
#have two parameters, a pair of strings. The function should
#return True if the strings are anagrams of one another,
#False if they are not.
#
#Two strings are considered anagrams if they have only the
#same letters, as well as the same count of each letter. For
#this problem, you should ignore spaces and capitalization.
#
#So, for us: "Elvis" and "Lives" would be considered
#anagrams. So would "Eleven plus two" and "Twelve plus one".
#
#Note that if one string can be made only out of the letters
#of another, but with duplicates, we do NOT consider them
#anagrams. For example, "Elvis" and "Live Viles" would not
#be anagrams.
#Write your function here!
#Below are some lines of code that will test your
function.
#You can change the value of the variable(s) to test your
#function with different inputs.
#
#If your function works correctly, this will originally
#print: True, False, True, False, each on their own line.
print(are_anagrams("Elvis", "Lives"))
print(are_anagrams("Elvis", "Live Viles"))
print(are_anagrams("Eleven plus two", "Twelve plus one"))
print(are_anagrams("Nine minus seven", "Five minus three"))
In: Computer Science
Duration of a ZCB repayable after seven years will be: Select one:
a. More than seven years
b. 3.5 years
c. Less than seven years
d. Seven years
e. None of these
In: Finance
Major car manufacturers make use of computer simulations to
experiment with possible plant layouts. The simulations are
designed to reflect stochastic effects such as different demand
patterns, chance variations in processing times and breakdowns.
Hence the results of running a simulation to calculate shifts’
production rates need to be analysed using appropriate statistical
methods. Often these computer simulations are quite complex with
quite long runtimes, and hence there is an interest in using as few
runs of the simulation as possible, whilst still being able to
detect meaningful differences in performance between different
layouts.
The performance measure on which layouts are being compared is
hourly production rate. Suppose that two possible plant layouts are
being considered and that each been simulated for 12 shifts. The
observed production rates are tabulated below.
Plant Layout Production rates (cars per hour)
Layout 1 128 112 111 114 121 119 131 121 122 114 116 129
Layout 2 126 112 107 114 118 114 131 122 118 113 112 131
a) Suppose that the results from the two layouts are independent
samples. What conditions must be satisfied if we are to apply a
parametric (i.e. z or t) test to compare the production rates of
the two layouts?
b) Describe a way in which the observation rates from the two
layouts could be paired. What conditions must be satisfied if we
are to apply a parametric (i.e. z or t) test to compare the
production rates of the two layouts if the samples are
paired?
c) Supposing that the conditions you outlined in part (b) are
satisfied, conduct the appropriate parametric test to compare the
production rates of the two layouts. Clearly justify your choice of
test, state your null and alternative hypotheses and explain your
conclusion. Use a 5% significance level.
d) What is the approximate power of the test you have applied in
part (c) if the true difference in production rates is that Layout1
is on average 2.0 cars per hour faster than Layout2?
In: Statistics and Probability
Consider the experimental results for the following randomized block design. Make the calculations necessary to set up the analysis of variance table.
| Treatments | ||||
|---|---|---|---|---|
| A | B | C | ||
| Blocks | 1 | 9 | 9 | 8 |
| 2 | 12 | 6 | 5 | |
| 3 | 18 | 15 | 14 | |
| 4 | 20 | 18 | 18 | |
| 5 | 8 | 7 | 8 | |
Use α = 0.05 to test for any significant differences.
Find the value of the test statistic. (Round your answer to two decimal places.)___
Find the p-value. (Round your answer to three decimal places.)
p-value = ___
The following data were obtained for a randomized block design involving five treatments and three blocks: SST = 570, SSTR = 390, SSBL = 95. Set up the ANOVA table. (Round your value for F to two decimal places, and your p-value to three decimal places.)
| Source of Variation |
Sum of Squares |
Degrees of Freedom |
Mean Square |
F | p-value |
|---|---|---|---|---|---|
| Treatments | 390 | ||||
| Blocks | 95 | ||||
| Error | 85 | ||||
| Total | 570 |
Test for any significant differences. Use α = 0.05.
Find the value of the test statistic. (Round your answer to two decimal places.)____
Find the p-value. (Round your answer to three decimal places.)
p-value = ____
An automobile dealer conducted a test to determine if the time in minutes needed to complete a minor engine tune-up depends on whether a computerized engine analyzer or an electronic analyzer is used. Because tune-up time varies among compact, intermediate, and full-sized cars, the three types of cars were used as blocks in the experiment. The data obtained follow.
| Analyzer | |||
|---|---|---|---|
| Computerized | Electronic | ||
| Car | Compact | 51 | 43 |
| Intermediate | 55 | 44 | |
| Full-sized | 62 | 45 | |
Use α = 0.05 to test for any significant differences.
Find the value of the test statistic. (Round your answer to two decimal places.)____
Find the p-value. (Round your answer to three decimal places.)
p-value = ____
In: Statistics and Probability
In: Economics
Festive Floral is gearing up for online carnation sales this Mother’s Day. They specialize in selling organic extra-large red and pink carnations. The price is $0.7 per stem, which includes free one-day shipping to the customer. Festive Floral pre-orders carnations directly from a certified organic farm at the cost of $0.15 per stem. The order is made prior to the growing season and flowers are grown accordingly, so the pre-order quantity cannot be changed. However, if Festive Floral runs out of pre-ordered carnations, they can always pick up more immediately from a local wholesaler that carries carnations of the same quality, at the price of $0.5 per stem. Historical demand for the past 10 years are given below.
Year: Red, Pink; 2008: 4008, 3288; 2009: 3948, 3648; 2010: 4092, 3636; 2011: 3984, 3684; 2012: 3996, 3792; 2013: 3888, 3720; 2014: 4128, 3564; 2015: 4104, 3744; 2016: 4380, 3828; 2017: 4392, 3744
For all questions below, please round your answers to two decimal points. Show your work by explaining the steps of your calculation.
(a) Using exponential smoothing with parameter ?? = 0.9, what is your forecast for red carnations in 2018? What is the MAD of your forecast?
(b) Based on the forecast above, what is the optimal number of red carnations to pre-order from the farm?
(c) Repeat Parts (a) and (b) for pink carnations.
In: Operations Management
In: Economics
IN C# WITH SCREENSHOTS OF THE CODE
RECURSION
Objectives
• Learn the basics of recursion.
Background
There are many problems that loops simplify, such as displaying
every pixel to a screen or
receiving repetitive input. However, some situations that can be
simplified with looping are not
easily solvable using loops. This includes problems that require
back tracking and being able to
use information from previous iterations, which would normally be
lost when using an iterative
loop. In those cases, it is much easier to use recursion to
logically solve the problem and it may
even reduce the amount of code that needs to be written.
Submission Guidelines:
You will turn in a Program code – 2 program files (one for each lab
problem)
Tasks
This lab has two parts:
1. Write a recursive method CalculateExponent( ) that takes in
two integer parameters, x
and y, and implements xy (x raised to the power y), where x and y
are integers and y > 0.
Write a driver program that calls this method from the Main
program.
2. Write a recursive method IntegerMultipy ( ) that takes in two
integer parameters i, j, and
implements i * j (integer multiplication), where i > 0. Define
the multiplication process in
terms of integer addition. For example, 4 * 7 is equal to 7 added
to itself 4 times. Write a
driver program that calls this method from the Main program.
Sample Output:
LAB 1:
Please enter a value for x
4
Please enter a value for y
2
Page 2 of 2
16
// Your program should check if y is a positive, non-zero
integer.
LAB 2:
Please enter a value for i
4
Please enter a value for j
7
28
Grading:
● 100 %: Attempted lab and submitted fully functioning lab
exercises with complete
headers and clear I/O statements and
● 95 %: Attempted lab and submitted fully functioning lab exercises
but incomplete
headers and/or unclear I/O statements before due date.
● 90%: All but one item are correct
● 80%: At least two more items are correct
● 70%: Program compiles and methods are correct
● 0%: Did not attempt lab or did not submit it before the due
date
In: Computer Science