Mathematics Analysis

Write an application that retrieves a student name and three scores per line from a text file (provided). Process the values by calculating the average of the scores per student.

Write the name and average to a different text file. Display what is being written to the new file. Test your application with a minimum of eight records in the

original file. Hint: You might consider using the split method of String class in order to separate name from scores in the data file

Here are the names provided in the text file (you may have to create a text file)
‘student.txt’
Kurt Smith,88,99,66,
Hot Dog,75,65,95,
Tim Baloni,45,56,90,
Janie Gray,87,88,67,
Ken Smith,60,88,71
Randolph Jascico,76,30,68
Tyler Osendorf,67,88,76
Choo Ching,98,87,92

Sample Solution

Linear Equations

You must work either on your own or with one partner. If you work with a partner you must first register as a group in CMS
and then submit your work as a group. Adhere to the Code of Academic Integrity. For a group, “you” below refers to “your
group.” You may discuss background issues and general strategies with others and seek help from the course staff, but the
work that you submit must be your own. In particular, you may discuss general ideas with others but you may not work out
the detailed solutions with others. It is not OK for you to see or hear another student’s code and it is certainly not OK to
copy code from another person or from published/Internet sources. If you feel that you cannot complete the assignment on
you own, seek help from the course staff.
Objectives
Completing this project will solidify your understanding of 2-dimensional and 3-dimensional arrays. In Part A, you
will practice working with matrices, including the use of Matlab as a (black box) tool to solve a system of linear
equations. In Part B, you will practice working with 2-d and 3-d arrays through an image processing application.
1 The Ising Model
Complete parts (a), (b), and (c) of Problem P7.3.6 (p.176) in Insight. By initializing A and then repeatedly
applying the function Sweep, you now have a simple implementation of the Ising Model.
(d’) Our model describes a system in which each cell tends to have the same state as its neighbors, subject to random
fluctuations. And it turns out that these random fluctuations play a critical role in the long term behavior of the
model. To explore this behavior, write a script simIsing to generate a visual representation of the simulation as it
proceeds. Set n to be 50 and p to be 0.75; use built-in functions pcolor1 and pause for the visualization. At the
end of the script, provide a brief answer, in the form of program comments, to each of the following questions: (1)
What is the longterm behavior of the model when T=0? When T is small? When T is large? (2) What values of T
do you consider to be small/large? (3) In this model, T admits the physical interpretation of temperature. Are your
observations consistent with such an interpretation? (Hint: How do the phases of matter relate to temperature?)
Submit your files InitialIsing.m, Potential.m, Sweep.m, and simIsing.m on CMS.
2 System of Linear Equations
Systems of linear equations often arise from the modeling of systems of interconnected
elements. In your physics class you may have studied the force and acceleration on a
connected set of free-falling objects. Such a model gives a coupled set of equations that
must be solved simultaneously; the equations are coupled because the individual parts of
the system are influenced by other parts.
[Our objective for this problem is to show how you can use Matlab as a solver of systems
of linear equations. We do not expect you to know linear algebra nor are we trying to teach
linear algebra. We will use the solver as a “black box,” so your only real task is to turn
a set of given equations into a matrix and a vector and then use the solver, which is just
an operator. So there’s no need to be afraid of the physics or math! This discussion and
problem is adapted from Introduction to Computing for Engineers by Chapra and Canale.]
Consider a set of n linear algebraic equations of the general form
1pcolor(A) gives a visualization of the values in matrix A by associating a color with an individual numeric value in A, see Eg7 3 in
Insight. For this problem, do not use the additional options shading interp and caxis as shown in Eg7 3 since we do not want any
interpolation—we have only two possible values in our matrix in this problem. If you want to learn more about pcolor, type help pcolor
or doc pcolor at the Matlab Command Window.
1
Created in Master PDF Editor
a11x1+ a12x2+ . . . + a1nxn = b1
a21x1+ a22x2+ . . . + a2nxn = b2
. . . .
. . . .
. . . .
an1x1+ an2x2+ . . . + annxn = bn
(1)
where the a’s are known constant coefficients, the b’s are known constants, and the n unknowns, x1, x2, . . . , xn, are
raised to the first power. This system of equations can be expressed in matrix notation as
Ax = b
or








a11 a12 . . . a1n
a21 a22 . . . a2n
. . .
. . .
. . .
an1 an2 . . . ann
















x1
x2
.
.
.
xn














b1
b2
.
.
.
bn








(2)
To solve this linear system of equations is to find the values x1, x2, . . . , xn such that Ax = b. In Matlab, the
solution can be found using the backslash, called the matrix left divide operator:
x = A\b (3)
where A is the n-by-n matrix of coefficients, b is the length n column vector of constants, and the result x is the
length n column vector of values such that Ax = b.
Your job: Write a script parachutes.m to find the acceleration h, force T, and force R experienced by a team
of three parachutists free-falling while connected by a weightless cord, as shown in the figure above. Suppose that
the parachutists are free-falling at a velocity (v) of 5 m/s, the acceleration due to gravity (g) is 9.8 m/s2
, and the
following values are given for the masses (m) and drag coefficients (d) of the parachutists:
Parachutist Mass, kg Drag Coefficient, kg/s
1 (bottom) 70 10
2 (middle) 60 14
3 (top) 40 17
The force-balance equations that define the relationships among the parachutists are
m1g − T − d1v = m1h
m2g + T − d2v − R = m2h
m3g + R − d3v = m3h
You need to do the following:

  1. Rewrite these equations in the general form of (1) by collecting terms together, where the unknowns are x1, x2,
    and x3. I.e., the unknowns in our problem, h, T, and R, are x1, x2, and x3, respectively, in (1). This means
    for each equation, re-arrange it so that the unknowns are on the left hand side while the constants are on the
    right hand side. For example, the third force balance equation can be rearranged as follows:
    m3g + R − d3v = m3h Original
    m3h − R = m3g − d3v All unknowns moved to left side; all constants moved to right side
    m3h + 0T − 1R = m3g − d3v Re-order left side by the 3 unknowns
    The final rearranged equation should have all three unknowns on the left side; some of their coefficients may
    be zero, as shown above. Do this rearrangement of each force equation by hand (on paper)—you do not need
    to include this step in your script or submit it.
    2
    Created in Master PDF Editor
  2. In your script, create the 3-by-3 matrix A—the coefficients of the 3 unknowns in the 3 equations—and the
    length 3 column vector b—the constants on the right side of the re-arranged equations—as shown in (2).
  3. Apply the matrix left division operator as shown in (3) to solve for x1, x2, and x3.
  4. Finally display the values of x1 through x3 neatly.
    Note that in this problem, most of the work is done by hand and you will write very little code. However, make sure
    that your script is cleanly commented and that the print output is clean and descriptive. For example, instead of
    printing just the value of x1, print something like acceleration h is 7.4 m/s^2 . (The value shown here is wrong;
    you will determine the actual answer through your code.)
    Submit your file parachutes.m on CMS.
    Part B of Project 4 will appear in a separate document. Both Parts A and B have the same due date.
    3
    Created in Master PDF Editor

Sample Solution

Linear regression

Identify what Factoring Type, A – E, will be used to Factor each of the given Polynomials #’s 1-5 below:
·

. Remove the GCF

A. Easy Trinomial,

B. Factor By Grouping,

C. Difference of Two Squares,

D. Double Trouble Trial and Error

Explain how to factor EACH polynomial using complete sentences illustrating your understanding.
Example: The polynomial is an Easy Trinomial.
The factors of -48 that add to give me -2 would be 6 and -8.
Since trinomials factor into 2 binomials the factored form would be (m+6)(m-8)
Use the Factoring Flow Chart posted in week 3 to help you.

  1. 25×4 – 9
  2. 9xy + 12yz – 3y
  3. x3 + x2 – 4x – 4
  4. x2 – 6x + 8
  5. 3×2 + 11x + 6

Sample Solution

Difference between response and predictor variables in a linear regression

You have been hired by the D. M. Pan National Real Estate Company to develop a model to predict housing prices for homes sold in 2019. The CEO of D. M. Pan wants to use this information to help their real estate agents better determine the use of square footage as a benchmark for listing prices on homes. Your task is to provide a report predicting the housing prices based square footage. To complete this task, use the provided real estate data set for all U.S. home sales as well as national descriptive statistics and graphs provided.

Directions
Using the Project One Template located in the What to Submit section, generate a report including your tables and graphs to determine if the square footage of a house is a good indicator for what the listing price should be. Reference the National Statistics and Graphs document for national comparisons and the Real Estate Data spreadsheet (both found in the Supporting Materials section) for your statistical analysis.

Note: Present your data in a clearly labeled table and using clearly labeled graphs.

Specifically, include the following in your report:

Introduction

Describe the report: Give a brief description of the purpose of your report.
Define the question your report is trying to answer.
Explain when using linear regression is most appropriate.
When using linear regression, what would you expect the scatterplot to look like?
Explain the difference between response and predictor variables in a linear regression to justify the selection of variables.

Sample Solution

Standard deviation is a proven mathematical methodology

Objective: Calculate returns and riskiness of returns for various assets
Introduction: Standard deviation is a proven mathematical methodology to measure the level of volatility for return on investments. When financial managers compare two funds with identical annualized returns, the fund with a lower standard deviation is typically the most attractive. The most common measure used for fund evaluation is standard deviation.

Step 1: Introduction about Standard Deviation and Risk
Provide a definition and introduction about “standard deviation” and explain how it is used to quantify risk.

The overall written analysis essay should include a minimum of three references cited within the content of the paper and the reference page according to APA guidelines.

Step 2: Standard Deviation 5 Step Procedure
Examine, in order, the five-step procedure for finding the standard deviation. Provide a brief description of each step and its purpose when possible. Review internal course readings and external sites about the standard deviation five-step procedure.
Note: you may find external sites that use more than five steps. It is okay to include and write about more than five standard deviation steps.
Optional: Insertion of an Excel example
Describe and address:
• How to calculate the expected rate of return of the investment
• Why it is best practice to subtract the expected rate of return of 15% from each of the possible rates of return and square the difference?
• Explain the purpose for multiplying the squared differences calculated in step 2 by the probability that those outcomes will occur
• Why it is necessary to sum all the values calculated in step 3 together?
• What does the square root of the variance calculated in step 4 describe?
Step 3: Asses and Conclude
• Assess whether it is possible to diversify away the risk inherent in investments
• Assess whether the standard deviation of a portfolio is, or is not, a weighted average of the standard deviations of the assets in the portfolio
• Write a brief summary conclusion of what you have learned about “standard deviation” and how it is used quantify risk

Sample Solution

How to properly write “figures”

Thought experiment: If I burry a golf ball inside the bucket. Design a way in which the the golf ball can float to the surface. Provide a new schematic with your design. Properly label the schematic which includes the dimensions of a 5 gallon bucket. Refer to the style guide on how to properly write “figures” such as make a proper figure label, etc. Describe fully the process of how ball can float to the surface of the sand in at least five sentences

Sample Solution

Mathematics question

Draw a schematic of a 5 gallon bucket of sand inside. Properly label the schematic which includes the dimensions of a 5 gallon bucket. Refer to the style guide on how to properly write “figures” such as make a proper figure label, etc. Describe the schematic in at least five sentences

Sample Solution

Probability

Two workers are currently trying to produce both pens and pencils for a company named We R’ Write. Worker A can produce 100 pencils per day or 50 pens. Worker B can produce 100 pencils per day or 20 pens.

If the workers continue to try and produce both, how many pencils will each worker produce, and how many pens will each worker produce?
What is the opportunity cost of producing pencils and for producing pens for each worker?
After specialization, how many pencils will be made in total by both workers?
After specialization, how many pens will be made in total by both workers?
What is the difference in the total number of pencils made by both workers after specialization?
What is the difference in the total number of pens made by both workers after specialization?

Sample Solution

Mathematics questions

  1. Explain the notions of mathematical differences, managerially important differences, and statistical significance. Can results be statistically significant and yet lack managerial importance. Explain your
    answer.
  2. Describe the steps in the procedure for testing hypotheses. Discuss the difference between a null hypothesis and an alternative hypothesis.
  3. What purpose does a scatter diagram serve?
  4. The following ANOVA summary data are the result of a regression with sales per year (dependent variable)as a function of promotion expenditures per year (independent variable) for a toy company.
    F = MSA = 34,276
    MSE 4,721
    The degrees of freedom are 1 for the numerator and 19 for the denominator. Is the relationship statistically significant at ” = .05? Comment on your answer.

Sample Solution

Linear regression

In this case study, you have been tasked with generating a loan approval workbook that
will determine if an applicant is eligible for a personal loan and if so, what the loan rate
should be based on a set of pre-defined criteria. The bank manager has created the
basic layout of the application she wants to use but has asked you to provide the
formulas that will drive the initial quote.
Instructions:
Determine Rate:
You need to provide a rate for each customer based on their credit score. Any user who
has a score less than 600 should be denied.

  1. Open case_study1_data and save as case_study1_LastFirst (use your own
    Last and First name).
    IF Function – Use the IF Function to figure out if an applicant is eligible for a personal
    loan. Please review this tutorial: Excel IF Functions For Beginners for help.
  2. Display the Approval Form worksheet and create an IF statement in cell I3 to
    determine if the applicant is eligible for a personal loan. Use the criteria below as
    part of your logic statement:
     Credit Score < 600 = “Denied”  Credit Score >= 600 = “Approved
  3. Copy using the Fill Handle the IF statement in cell I3 to into the Range I4:I10.
    VLOOKUP Function – Use the VLOOKUP Function to determine the rate of for those
    customers that were approved based on their credit scores. Please review this tutorial:
    VLOOKUP Functions for Beginners for help.
  4. Create a VLOOKUP function in cell J3 that uses the Credit Score in cell F3 to
    generate a rate based on the array in cells N4:O10. NOTE – Make sure to use
    the correct cell referencing.
  5. Copy using the Fill Handle the VLOOKUP statement in cell J3 to into the Range
    J4:J10.
  6. Delete out any Rate value for those customers that were denied.
    Copyright 2022 Post University, ALL RIGHTS RESERVED
    Calculate Payment:
    PMT Function – Use the PMT Function to calculate the payment. Remember that the
    Yearly Periodic Rate is the Rate divided by the number of Months. Please review this
    tutorial: Excel PMT() Function Basics for help.
    You will calculate the payment quote for each customer.
  7. Calculate the periodic rate of the loan in cell K3.
  8. Copy using the Fill Handle the Periodic Rate in cell K3 to into the Range
    K4:K10.
  9. Delete out any Rate value for those customers that were denied.
    10.Use the PMT Function in cell L3 to calculate the payment. Make sure to return a
    positive value.
    11.Copy using the Fill Handle the Payment in cell L3 to into the Range L4:L10.
    12.Delete out any Rate value for those customers that were denied.
    Determine Maturity Dates:
    You will create a working list of all existing accounts that provides the number of days
    remaining on their loan and an overall look at all the accounts maturity dates.
    13.Display the Existing Accounts worksheet and calculate the number of days
    remaining for each existing account based on today’s date. You will need to use
    the Today() Function in your calculations.
    14.Calculate the maximum number of Days Remaining for all existing accounts in
    cell C17.
    15.Calculate the minimum number of Days Remaining for all existing accounts in
    cell C18.

Sample Solution