Research conducted by Worldwide, Inc., a manufacturer of laptop computers, shows that potential laptop customers (i.e., “buyers”) differ in the importance that they attach to the following two laptop features: (1) that the laptop include a solid state drive (i.e., SSD), and (2) that the laptop include a high resolution screen. A sample of five representative (prospective) customers of Worldwide reveals the following set of preferences for these attributes/benefits (the data are comma-delimited):
1, 6, 8
2, 3, 4
3, 4, 1
4, 4, 8
5, 5.5, 7 (this is not a typo: the x value for customer #5 is 5 ½)
where:
(1) the measurement scale is continuous, and ranges from 1=very unimportant to
10=very important
(2) the first entry in a row is the respondent i.d. number
(3) the second entry (x-axis) is the importance weight attached to “includes a SSD”
(4) the third entry (y-axis) is the importance weight attached to “includes a high resolution
screen”
For Question #1, parts (a) through (h) below, perform a k-means cluster analysis of the Worldwide data. For purposes of this question, set k= 2, and use the point (3,5) as initial centroid #1 and the point (6,1) as initial centroid #2. Perform all numeric calculations to 3 decimal places of precision (e.g., 8.352).
(1a) Which customers (i.e., “buyers”) are assigned to starting centroid #1, and what is the Euclidean distance between each of these customers and starting centroid #1? In your answer clearly indicate each customer’s id, and the Euclidean distance (to 3 decimal places) between the customer and starting (i.e., initial) centroid #1.
Buyer id: _________ Distance: ____________
Buyer id: _________ Distance: ____________
Buyer id: _________ Distance: ____________
Buyer id: _________ Distance: ____________
Buyer id: _________ Distance: ____________
(Note: here, and below, complete for as many customers as appropriate)
(1b) Which customers are assigned to starting centroid #2, and what is the Euclidean distance between each of these customers and starting centroid #2? In your answer clearly indicate each customer’s id, and the Euclidean distance (to 3 decimal places) between the customer and starting centroid #2.
Buyer id: _________ Distance: ____________
Buyer id: _________ Distance: ____________
Buyer id: _________ Distance: ____________
Buyer id: _________ Distance: ____________
Buyer id: _________ Distance: ____________
(1c) Following your assignment (in 1a and 1b above) of customers to the two starting centroids, what are the revised (i.e., updated) centroid values for centroid #1 and centroid #2? (Note: you can refer to these revisions as “1st iteration”-revised centroids)
1st iteration-revised centroid #1: ___________
1st iteration-revised centroid #2: ___________
(1d) Next, based on your answer to part (1c), and continuing the k-means clustering process, which customers should be assigned to the 1st iteration-revised centroid #1, and what is the Euclidean distance between each of these customers and the 1st iteration-revised centroid #1?
Buyer id: _________ Distance: ____________
Buyer id: _________ Distance: ____________
Buyer id: _________ Distance: ____________
Buyer id: _________ Distance: ____________
Buyer id: _________ Distance: ____________
(1e) Similarly, based on your answer to part (1c), which customers should be assigned to the 1st iteration-revised centroid #2, and what is the Euclidean distance between each of these customers and the 1st iteration-revised centroid #2?
Buyer id: _________ Distance: ____________
Buyer id: _________ Distance: ____________
Buyer id: _________ Distance: ____________
Buyer id: _________ Distance: ____________
Buyer id: _________ Distance: ____________
(1f) Based on your customer assignments in parts (1d) and (1e), what are the 2nd iteration-revised centroid values, for centroid #1 and centroid #2?
2nd iteration-revised centroid #1: ___________
2nd iteration-revised centroid #2: ___________
(1g) Are any additional iterations needed in this k-means clustering problem? Yes or no? Why or why not?
___________________________________________________________________
(1h) What is the Euclidean distance between the final cluster centroids (i.e., the 2nd iteration-revised centers)?
Distance = _______________
In: Statistics and Probability
Write a game where a user has to guess a number from 1 – 6, inclusive.
Your program will generate a random number once (pick a number), and will then prompts the user to guess the number for up to 3 times. If the user enters 3 wrong guesses, the program should be terminated along with the losing message. Once the user has successfully guessed the number, tell the user they win, and tell them how many guesses it took them to guess it right.
Use a loop to check your user input. Use string’s .isnumeric() to check to see if the user has provided you with a valid number before you use a cast to an integer. Your program should not crash if the user gives you bad input. Also if the user’s input wasn’t a digit, do not count it as one of the 3 chances that the user have to guess the number.
To create a random number use:
import random myRandomNumber = random.randint(1, 6)
Sample game:
I've picked a number between 1 and 6, can you guess it? 1 Nope, it's not 1 Your guess is too low I've picked a number between 1 and 6, can you guess it? 2 Nope, it's not 2 Your guess is too low I've picked a number between 1 and 6, can you guess it? 4 Nope, it's not 4 Your guess is too low You lost :'(. The random pick was 5.
And here is another run of the game that user wins:
I've picked a number between 1 and 6, can you guess it? 1 Nope, it's not 1 Your guess is too low I've picked a number between 1 and 6, can you guess it? 2 You got it! You won! :). It took you 2 guesses.
And here is an example that the user enters wrong inputs that are not digits:
I've picked a number between 1 and 6, can you guess it? hello You entered an invalid entry: hello. You must enter a digit. I do not count this for you! I've picked a number between 1 and 6, can you guess it? You entered an invalid entry: . You must enter a digit. I do not count this for you! I've picked a number between 1 and 6, can you guess it? 5 Nope, it's not 5 Your guess is too I've picked a number between 1 and 6, can you guess it? 4 Nope, it's not 4 Your guess is too high I've picked a number between 1 and 6, can you guess it? 2 You got it! You won! :). It took you 3 guesses.
In: Computer Science
Each of the four independent situations below describes a finance lease in which annual lease payments are payable at the beginning of each year. The lessee is aware of the lessor’s implicit rate of return. (FV of $1, PV of $1, FVA of $1, PVA of $1, FVAD of $1 and PVAD of $1) (Use appropriate factor(s) from the tables provided.)
| Situation | ||||||||||||||||||
| 1 | 2 | 3 | 4 | |||||||||||||||
| Lease term (years) | 4 | 7 | 5 | 8 | ||||||||||||||
| Lessor's rate of return | 10 | % | 11 | % | 9 | % | 12 | % | ||||||||||
| Fair value of lease asset | $ | 66,000 | $ | 366,000 | $ | 91,000 | $ | 481,000 | ||||||||||
| Lessor's cost of lease asset | $ | 66,000 | $ | 366,000 | $ | 61,000 | $ | 481,000 | ||||||||||
| Residual value: | ||||||||||||||||||
| Estimated fair value | 0 | $ | 66,000 | $ | 23,000 | $ | 35,000 | |||||||||||
| Guaranteed fair value | 0 | 0 | $ | 23,000 | $ | 40,000 | ||||||||||||
Required:
a. & b. Determine the amount of the annual
lease payments as calculated by the lessor and the amount the
lessee would record as a right-of-use asset and a lease liability,
for each of the above situations. (Round your answers to
the nearest whole dollar amount.)
| Lease Payments | Residual Value Guarantee | PV of Lease Payments | PV of Residual Value Guarantee | Right of Use Asset / Lease Liability | |
| Situation 1 | 18928 | 0 | 66000 | 0 | 66000 |
| Situation 2 | ? | ? | ? | ? | ? |
| Situation 3 | ? | ? | ? | ? | ? |
| Situation 4 | ? | ? | ? | ? | ? |
In: Accounting
Check My Work (1 remaining) Click here to read the eBook: Uneven Cash Flows PV OF CASH FLOW STREAM A rookie quarterback is negotiating his first NFL contract. His opportunity cost is 6%. He has been offered three possible 4-year contracts. Payments are guaranteed, and they would be made at the end of each year. Terms of each contract are as follows: 1 2 3 4 Contract 1 $2,500,000 $2,500,000 $2,500,000 $2,500,000 Contract 2 $2,500,000 $3,500,000 $4,500,000 $5,000,000 Contract 3 $7,000,000 $1,500,000 $1,500,000 $1,500,000 As his adviser, which contract would you recommend that he accept? Select the correct answer. a. Contract 1 gives the quarterback the highest present value; therefore, he should accept Contract 1. b. Contract 2 gives the quarterback the highest present value; therefore, he should accept Contract 2. c. Contract 1 gives the quarterback the highest future value; therefore, he should accept Contract 1. d. Contract 3 gives the quarterback the highest future value; therefore, he should accept Contract 3. e. Contract 3 gives the quarterback the highest present value; therefore, he should accept Contract 3.
In: Finance
The following data was collected to explore how a student's age and GPA affect the number of parking tickets they receive in a given year. The dependent variable is the number of parking tickets, the first independent variable (x1) is the student's age, and the second independent variable (x2) is the student's GPA. Effects on Number of Parking Tickets Age GPA Number of Tickets 24 4 9 23 3 8 22 2 8 22 2 5 22 2 3 20 2 1 18 2 1 18 2 0 18 2 0 Step 1 of 2 : Find the p-value for the regression equation that fits the given data. Round your answer to four decimal places.
In: Statistics and Probability
What is the contribution to the asset base of the following items under the Basel III requirements? (Leave no cells blank - be certain to enter "0" wherever required. Enter your answers in dollars not in millions.)
| a. | $8 million cash reserves. |
| b. | $46 million 91-day U.S. Treasury bills. |
| c. | $23 million cash items in the process of collection. |
| d. | $4 million U.K. government bonds, OECD CRD rated 1. |
| e. | $4 million French short-term government bonds, OECD CRD rated 2. |
| f. | $3 million general obligation bonds. |
| g. | $40 million repurchase agreements (against U.S. Treasuries). |
| h. | $3 million loan to foreign bank, OECD rated 3. |
| i. | $460 million 1-4 family home mortgages, category 1, loan-to-value ratio 80%. |
| j. | $8 million 1-4 family home mortgages, category 2, loan-to-value ratio 95%. |
| k. | $4 million 1-4 family home mortgages, 100 days past due. |
| l. | $460 million commercial and industrial loans, AAA rated. |
| m. | $460 million commercial and industrial loans, B- rated. |
| n. | $300,000 performance-related standby letters of credit to a AAA rated corporation. |
| o. | $300,000 performance-related standby letters of credit to a municipality issuing general obligation bonds. |
| p. | $6 million commercial letter of credit to a foreign bank, OECD CRC rated 2. |
| q. | $2 million five-year loan commitment to a foreign government, OECD CRC rated 1. |
| r. | $3 million bankers’ acceptance conveyed to a U.S., AA rated corporation. |
| s. | $10 million three-year loan commitment to a private agent. |
| t. | $10 million three-month loan commitment to a private agent. |
| u. | $20 million standby letter of credit to back an A rated corporate issue of commercial paper. |
| v. | $8 million five-year interest rate swap with no current exposure. |
| w. | $7 million two-year currency swap with $600,000 current exposure. |
In: Accounting
Solve problem (P4.2) from the textbook using the following data instead of the data given in the textbook. Solve only requirements under a, b and c. Show your assumptions and consequent calculations on how you catered for the fact that 1997 means first half of the year and 1997.5 means in the second half of the year; without such initial, your solution will not be considered as your own. (Hint: you may use Excel or any software to conduct linear regression/linear curve fitting. Note also that ‘condition’ should be related to age and not the date).
Show the details of your ‘software’ analysis and calculations.
|
Date |
Condition |
|
1985 |
1 |
|
1985.5 |
1 |
|
1996.5 |
2 |
|
1997 |
2 |
|
1997.5 |
2 |
|
1998 |
2 |
|
1998.5 |
2 |
|
1999 |
2 |
|
1999.5 |
3 |
|
2000 |
3 |
|
2000.5 |
3 |
|
2001 |
4 |
|
2001.5 |
4 |
|
2002 |
4 |
|
2002.5 |
4 |
|
2003 |
4 |
This is the book Q :
Appearing below is a series of roof inspection condition
summaries, where 1 is excellent and 5 is poor. Note that an
inspection 1997.5 occurred in the second six months of 1997,
whereas 1997 occurred in the first six months of 1997. The roof was
replaced in 1985. Answer the questions below. You might use
software aids, such as EXCEL or MATLAB, for this problem.
65
a. Estimate an ordinary least squares regression deterioration
model of the form: Condition = a + b(age) where age is the age of
the roof in years. Report your parameter estimates, standard
errors, t-statistics and R^2 values. Note that there is a gap in
the data from 1985 to 1996! b. Suppose I have a comparable roof
that is 12 years old. What would your regression model in (a)
predict for its condition? What would it predict for age 18? At
what age is condition expected to become 5? c. Plot the data and
your regression line.
course: Infrastructure managment
In: Operations Management
part 1)
Find dy/dx by implicit differentiation.
3x^6+x^5y−2xy^6=8
dy/dx=
part 4)
A campground owner has 2000 meters of fencing. She wants to enclose a rectangular field bordering a lake, with no fencing needed along the lake: see the sketch.
a) Write an expression for the length of the field: 2000-x (this is correct)
b) Find the area of the field (length times width): -x^2+2000x (this is correct)
c) Find the value of x leading to the maximum area:
d) Find the maximum area:
I got (2y^6-5yx^4-30x^5)/(x^5-12xy^5)
part 2)
sqrt (x+y)=9+x^2y^2
dy/dx= (80+4x^3y^4+36xy^2)/(1-4x^4y^3-36x^2y)
part 3)
Use implicit differentiation to find an equation of the tangent line to the curve
sin(x+y)=6x−6y at the point (π,π).
Tangent Line Equation: y= (5x/7)-(2pi/7)
In: Math
there are 200 families of parents heterozygous for albinism, which present normal pigmentation. They all had 4 children, where 60 families with 4 children were found with normal pigmentation, 58 families with 3 children with normal pigmentation, 57 families with 2 children with normal pigmentation, 16 families with 1 child with normal pigmentation and 9 families with 4 albino children. Using the binomial expansion determine the theoretical probability of the possible 5 combinations. Using chi 2, prove that the distribution obtained from people without the condition and with albinism in the 200 families is consistent with what was expected.
In: Statistics and Probability
Given the matrix as shown below
n_array =
3 1 8
3 5 7
4 9 2
Write a M-file script program that generates this n_array, and answer each question using one line of MATLAB statement.
a) Replace the second column of the n_array with a column of 0s
b) Replace the element in the second-row, third-column with a zero
c) Change the n_array to a 4 x 3 array by adding a row of 0s
The end result for the n_array will be
n_array =
3 0 8
3 0 0
4 0 2
0 0 0
In: Computer Science