Hi,
Working through a chapter on sampling distributions and getting stuck very early on something that must be so simple the book didn't see fit to explain properly.
Example: In a certain population 30% of people are of blood type
A. A random sample of size 5 is drawn. Therefore the population
proportion with type A is p = 0.3.
The possible values of pˆ are 0, 0.2, 0.4, 0.6, 0.8, 1.
Why are these the possible values of p^? The numbers given create 5 intervals - is it because we have a sample of 5? If the sample was 10, would the possible values changed? It makes sense to me that they would, but my book doesn't go this way, the next paragraph shows that P(0.2 ≤ pˆ ≤ 0.4) increases as the sample size increases so it seems that the 'possible values' haven't moved.
Could anybody explain to me what is the story with the 'possible values' pf p^ here?
Thanks a lot
In: Statistics and Probability
Question 3. Monthly demand at A&D Electronics for flat-screen TVs are as follows:
Month Demand (units)
1 1,000
2 1,113
3 1,271
4 1,445
5 1,558
6 1,648
7 1,724
8 1,850
9 1,864
10 2,076
11 2,167
12 2,191
Estimate demand for the next two weeks using simple exponential smoothing with a = 0.3 and Holt’s model with a = 0.05 and b = 0.1. For the simple exponential smoothing model, use the level at Period 0 to be L0 =1,659 (the average demand over the 12 months). For Holt’s model, use level at Period 0 to be L0= 948 and the trend in Period 0 to be T0 = 109 (both are obtained through regression). Evaluate the MAD, MAPE, MSE, bias, and TS in each case. Which of the two methods do you prefer? Why?
Note: Please, solve the problems by using MS Excel.
In: Statistics and Probability
Run the following code and answer the following questions:
(a) How do accuracy change with changing the tree maximum depth? [Your answer]
(b) What are the ways to reduce overfitting in a decision tree? [Your answer]
from sklearn import datasets
import numpy as np
from sklearn.model_selection import train_test_split
from sklearn.tree import plot_tree
iris = datasets.load_iris()
X = iris.data[:, [2, 3]]
y = iris.target
X_train, X_test, y_train, y_test = train_test_split(
X, y, test_size=0.3, random_state=1, stratify=y)
tree = DecisionTreeClassifier(criterion='entropy',
max_depth=10,
random_state=1)
tree.fit(X_train, y_train)
y_pred = tree.predict(X_test)
test_accuracy = metrics.accuracy_score(y_test, y_pred)
print("Test accuracy of decision tree classifier on Iris dataset:
"+str(test_accuracy))
plt.figure(figsize=(10, 7))
plot_tree(tree,
filled=True,
rounded=True,
class_names=['Setosa',
'Versicolor',
'Virginica'],
feature_names=['petal length',
'petal width'])
plt.show()
In: Computer Science
Magic Inc. has 1 billion of BBB-rated debt with a yield to maturity of 5%. BBBrated debt has a default rate of 5% and the expected loss rate in the event of default is 40%. Magic Inc’s stocks have a market value of 1 billion and a beta of 1. Assume the risk-free rate is 0%, the expected market risk premium is 10%, and corporate tax rate is 30%.
a. What is the firm’s cost of debt?
b. What is the firm’s cost of equity?
c. What is the firm’s weighted cost of capital?
d. Now you want to use the FFC model to calculate the equity cost of capital. You have estimated factor betas and factor returns below. Calculate the equity cost of capital using the FFC factor specification.
Factor Portfolio. Factor betas Average yearly returns
MKT - rf 1 10%
SMB -0.3 20%
HML -0.1 20%
PR1YR 0.1 70%
In: Finance
Write it in P program. This is only one question with multiple parts, so please answer all the parts of the question, it is not much. Please also include a screenshot of your R program.
Z=(X-E(X))/sd(X)
Where E(X)= mean of B(n,p), which is np, sd(X) = standard deviation of B(n,p), which is sqrt(np(1-p)).
In: Statistics and Probability
The
following description applies to problems 3
and 4.
A computer program is tested by 5
independent
tests.
If there is an error,
these tests will discover it with probabilities 0.1,
0.2,
0.3,
0.4,
and 0.5
respectively.
Suppose that the program contains an error.
What is the probability that it will be found
In: Math
A store has N clients per day, where the probability that N will be three is 0.1, that N will be two is 0.4, that N will be one is 0.3. The store never gets more than three clients per day.
(a) Is N binomial? Poisson?
(b) Write the cumulative distribution function for N.
(c) What is the average number of clients per day?
(d) You want to study how many bags of milk each client buys. Half of them buy two bags, a quarter buy 1 bag, and the rest buy none. Let X be the number of bags of milk purchased on a given day. Are X and N independent?
(e) What is the probability that 5 bags will be purchased?
(f) What is the probability that there will be 3 clients and that 5 bags will be purchased?
(g) What is the probability the 5 bags will be purchased given that there are three clients?
(h) Find the probability function of X.
In: Statistics and Probability
A retaining wall against a mud slide is to be constructed by placing 1.2 m-high rectangular concrete blocks (ρconcrete = 2700 kg/m3 ) side by side, as shown in Figure 1. The friction coefficient between the ground and the concrete blocks is f = 0.3, and the density of the mud is about 1800 kg/m3 . There is concern that the concrete blocks may slide or tip over the lower left edge as the mud level rises.
a) Determine the minimum width w of the concrete blocks at which the blocks will overcome friction and start sliding. Plot the results over the mud height ranging from zero to the top of the retaining wall in 0.2 m-increments.
b) Determine the minimum width w of the concrete blocks at which the blocks will tip over. Plot the results over the mud height ranging from zero to the top of the retaining wall in 0.2 m-increments in the same graph as a).
c) Briefly comment on the results.
In: Physics
Consider the following institutional network that is connected to the Internet. Suppose that the average object size is 240,000 bits and that the average request rate from the institution’s browsers to the origin servers is 62 requests per second. Also suppose that the amount of time it take from when the router on the Internet side of the access link forwards an HTTP request until it receives the response is 1.5 seconds on average (see Section 2.2.5). Model the total average response time as the sum of the average access delay (that is, the delay from Internet router to institution router) and the average Internet delay. For the average access delay, use α/(1- αλ), where α is the average time required to send an object over the access link and λ is the arrival rate of objects to the access link. a. Find the total average response time. b. Now suppose a cache is installed in the institutional LAN. Suppose the hit rate is 0.3. Find the total average response time.
In: Computer Science
1. An asset is forecast to have a return of 30% with a probability of .5 (50%) and a return of 10% with a probability of .5 (50%). The expected return is 20%. What is the variance of the returns?
a) 0
b) none of these
c) 0.1
d) 0.01
2. An asset has a variance of .0009. The standard deviation of the asset is:
a) 0
b) 0.3
c) 0.003
d) 0.03
3. Which of the following would typically be considered as an unsystematic risk factor?
a) a major product of the firm, accounting for 80% of its sales, is found to be unsafe and may no longer be sold
b) gross domestic product is forecast to grow more slowly than expected
c) the cost of petroleum is expected to increase significantly
d) the federal government increase corporate tax rates by 20 percentage points
4. An asset with only one possible outcome would
a) have a zero standard deviation
b) have no risk
c) have a zero variance
d) all of these
In: Finance