Q1: what does the efficient frontier represents?
Q2: how do we estimate the return and standard deviation of a newly built portfolio from analyzing the stocks in that portfolio?
Q3: in the regression equation, what is meant by a regression that has an R-square with 0.95 and how does it compare with a regression with a R-square of 0.30?
Q4: why do we use adjusted beta?
Q5: what is the information ratio and why do we use it?
In: Finance
For these of string functions, write the code for it in C++ or Python (without using any of thatlanguage's built-in functions) You may assume there is a function to convert Small string into the language string type and a function to convert your language's string type back to Small string type.
1. int [] searchA,ll(string in...str, string sub): returns an array of positions of sub in in...str or an one element array with -1 if sub doesn't exist in in...str
In: Computer Science
Write a program named “hw2-extra.py” that will find duplicate numbers in an array.Here is a
sample run of the program. An example for an input is as follows. The program tells you “The
7
duplicate numbers: 2 3 7 1”.
Again, do not use built-in functions if there is any.
You can read
the input from the file named as “hw2-ExtraCredit.txt”
235231779 13 15 99 96 4 1
The duplicate numbers: 2 3 1 7
In: Computer Science
a) Explain differential movement and prevention in brick and concrete masonry. Where the control joints are must be located.
b) A 150 –ft exterior clay brick wall is designed for ½ -in expansion joints and a joint compressibility of 40 %. Determine the maximum joint spacing and the minimum number of joints required for entire wall. (Wall is going to be built in Lubbock TX. Temperature difference can be taken as 80ºF. Annual mean relative humidity is moderate 75>AMRH>50)
In: Civil Engineering
Q1: what does the efficient frontier represents?
Q2: how do we estimate the return and standard deviation of a newly built portfolio from analyzing the stocks in that portfolio?
Q3: in the regression equation, what is meant by a regression that has an R-square with 0.95 and how does it compare with a regression with a R-square of 0.30?
Q4: why do we use adjusted beta?
Q5: what is the information ratio and why do we use it?
In: Finance
Which of the following is true?
a. Catabolism is degradative, in which organic molecules are converted into smaller, simpler end products with the consumption of energy.
b. Anabolism is degradative, in which organic molecules are converted into smaller, simpler end products with the consumption of energy.
c. Catabolism is degradative, in which organic molecules are converted into smaller, simpler end products with the release of energy.
d. Catabolism is synthetic, in which small simple precursors are built up into organic molecules with the consumption of energy.
e. Anabolism is synthetic, in which small simple precursors are built up into organic molecules with the release of energy.
Which of the following is true?
a. Enthalpy, H, is the heat content of the reacting system. If a reaction consumes heat is it called exothermic, because it is taking heat from its external surroundings.
b. Entropy, S, is a quantitative expression for the order in a system. The universe tends to move away from entropy.
c. Gibbs free energy, G, expresses the amount of energy available to do work. The temperature and pressure are not relevant.
d. Enthalpy, H, is negative when a reaction is exothermic, because the reaction is releasing heat.
e. Gibbs free energy, G, is positive when a reaction is thermodynamically favorable because it takes energy to make reactions proceed.
In: Biology
This question demonstrates the use of inheritance and
polymorphism.
Design a Ship class that has the following members:
• A field for the name of the ship (a string).
• A field for the year that the ship was built (a string).
• A constructor and appropriate accessors and mutators.
• A toString method that overrides the toString method in the
Object class. The Ship class
toString method should display the ship’s name and the year it was
built.
Design a CruiseShip class that extends the Ship class. The
CruiseShip class should have the following members:
• A field for the maximum number of passengers (an int).
• A constructor and appropriate accessors and mutators.
• A toString method that overrides the toString method in the base
class. The CruiseShip class’s
toString method should display only the ship’s name and the maximum
number of passengers.
Design a CargoShip class that extends the Ship class. The CargoShip
class should have the following members:
• A field for the cargo capacity in tonnage (an int).
• A constructor and appropriate accessors and mutators.
• A toString method that overrides the toString method in the base
class. The CargoShip class’s
toString method should display only the ship’s name and the ship’s
cargo capacity.
Demonstrate the classes in a program that has a Ship array. Assign
various Ship, CruiseShip, and CargoShip objects to the array
elements. The program should then step through the array and print
each object.
In: Computer Science
A regression model of the form
y = beta0 + beta1 x1 + beta2 x2 + beta3 x3 + E
was built using 20 observations. Partially completed regression output tables are provided below. What are the values of A, B, and C?
Table 1
|
Statistic |
Value |
|
R-Square |
A |
|
Adjusted R-Square |
B |
|
Standard Error (RMSE) |
C |
|
n |
20 |
Table 2
|
Source |
DF |
SS |
MS |
F |
P-Value |
|
Regression |
D |
175 |
H |
J |
K |
|
Error |
E |
G |
I |
||
|
Total |
F |
250 |
A regression model of the form
y = beta0 + beta1 x1 + beta2 x2 + beta3 x3 + E where E is assumed to be normal with mean 0 and constant variance.
was built using 20 observations. Partially completed regression output tables are provided below. What are the values of D, E, and F?
Table 1
|
Statistic |
Value |
|
R-Square |
A |
|
Adjusted R-Square |
B |
|
Standard Error (RMSE) |
C |
|
n |
20 |
Table 2
|
Source |
DF |
SS |
MS |
F |
P-Value |
|
Regression |
D |
175 |
H |
J |
K |
|
Error |
E |
G |
I |
||
|
Total |
F |
250 |
In: Statistics and Probability
Part A - For Loops
Charlie, an avid mountain biker, has purchased a new multisport watch that measures data such as horizontal position, time, heart rate and elevation. The associated software for the watch allows for users to design their own apps that record new measurements. Charlie is interested in measuring their elevation gain and total distance travelled.
1. Write a MATLAB function that recieves vectors for horizontal position and elevation and outputs a plot of elevation vs. horizontal position. (1 mark)
2. Write a function that receives the vectors for horizontal position and elevation and outputs total distance travelled. You can assume that each point has been recorded sufficiently close together that a linear approximation incurs insignificant error. Your solution must use a for loop and is not allowed to use the in-built sum or diff functions. Hint: Calculate the distance between each coordinate and sum these distances together.
3. Elevation gain is a term used to describe the total vertical distance climbed up during uphill sections (downhill elevation changes are ignored). Write a function that receives an elevation vector and calculates the total elevation gain for the trip. Your solution must use a for loop and is not allowed to use the in-built sum or diff functions.
In: Computer Science
Python:
Write a function that receives a one dimensional array of integers and returns a Python tuple with two values - minimum and maximum values in the input array. You may assume that the input array will contain only integers and will have at least one element. You do not need to check for those conditions.
Restrictions: No built-in Python data structures are allowed (lists, dictionaries etc). OK to use a Python tuple to store and return the result.
Below is the starter skeleton code for this problem, on which the implementation must be built. Methods defined in the skeleton code must retain their names and input / output parameters. Variables defined in skeleton code must also retain their names.
from a1_include import
*def min_max(arr: StaticArray) -> ():
"""
TODO: Write this implementation
"""
return 0, 0
# BASIC TESTING
if __name__ == "__main__":
# example 1
arr = StaticArray(5)
for i, value in enumerate([8, 7, 6, -5, 4]):
arr[i] = value
print(min_max(arr))
# example 2
arr = StaticArray(1)
arr[0] = 100
print(min_max(arr))
# example 3
arr = StaticArray(3)
for i, value in enumerate([3, 3, 3]):
arr[i] = value
print(min_max(arr))
In: Computer Science