Question

I need help writing the step by step directions (algorithm) for the following C++ code. ex....

I need help writing the step by step directions (algorithm) for the following C++ code. ex. what would be input, output, and inbetween. No computer code!

Many properties in engineering and science can be analyzed by trying to fit a straight line which uses x as the independent variable and y as the dependent variable. Suppose you have an array of x values and a corresponding array of y values. Write the process to fit a straight line to the data. Using the scenario y = mx + b, where m is the slope and b is the y intercept, m can be calculated by the formula
(Σx * Σy - n Σ(x * y))/((Σx)2 – n Σ(x)2 )
where n is the number points and b is given by
(Σy – slope * Σx)/n
where n is again the number of points

0 0
Add a comment Improve this question Transcribed image text
Know the answer?
Add Answer to:
I need help writing the step by step directions (algorithm) for the following C++ code. ex....
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • i neeed help for my qz2 this one is visual basic , i dont understand how...

    i neeed help for my qz2 this one is visual basic , i dont understand how to write code QZ2: Linear Regression (100 points) Given: A data table (see next page) Find: 1. Use one-dimensional array to find the equation of least-squares-fit line (slope and y-intercept; 10 points each), correlation coefficient and coefficient of the determination (10 points each) 2. Use two-dimensional array to find the equation of least-squares-fit line (slope and y-intercept; 10 points each), correlation coefficient and coefficient...

  • C++ Code Needed for Lab! Let l be a line in the x-y plane. If l...

    C++ Code Needed for Lab! Let l be a line in the x-y plane. If l is a vertical line, its equation is x = a for some real number a. Suppose l is not a vertical line and its slope is m. Then the equation of l is y = mx + b, where b is the y-intercept. If l passes through the point (x₀, y₀), the equation of l can be written as y - y₀ = m(x...

  • I need help with parts A B D E and F. Please show hand work for...

    I need help with parts A B D E and F. Please show hand work for solving A and B while D and E should be matlab codes. How do i pick the right graph for part F? 5 2 4 6 Linear spline: s fi+ (x-x) 2) Given the points 40 78 125 256 348 425 X1-x a) Write the correct linear spline equation to interpolate for x 4.72, simplifying where appropriate to get to the slope-intercept form. (4...

  • Find Lease Squares Regression Line (LSRL) equation for the following five- point data set step by...

    Find Lease Squares Regression Line (LSRL) equation for the following five- point data set step by step X 2 6 8 10 Υ 1 2 3 4 26 ν Σα2 = (Select] Σy = 10 Σ y = (Select] [Select] Σ α) = ν [Select] T Σ» ΕΙ Π Κ. [Select] < SS.x2 = I x2 - ( x) = [Select] < SSxy = {xy - 1(x) ( y) = (Select ] < SSyy = < y2 - ( y)2...

  • I need clarification on R studio code. Given the below table, what is Y ~ A...

    I need clarification on R studio code. Given the below table, what is Y ~ A + B + A*B? Is it the same as Y~A*B? Syntax Model Comments Y~ A Straight-line with an implicit y- intercept Straight-line with no y-intercept that is, a fit forced through (0.0 Polynomial model; note that the identity function I() allows terms in the model to include normal mathematical symbols A first-order model in A and B without interaction terms A model containing only...

  • I need help answering these questions MULTIPLE CHOICE. Choose the one alternative that best completes the...

    I need help answering these questions MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answer the question. 1) The purpose of a linear regression line is to A) calculate the correlation coefficient B) display the bivariate distribution of X and Y C) identify the mean of the X and Y variables D) predict one set of scores from another set 2) The general equation for a straight line is expressed as A) Y - X- B)...

  • Answer questions 3: A) B) C) and D) 3 for your plot. Graphing exercise: Graph by...

    Answer questions 3: A) B) C) and D) 3 for your plot. Graphing exercise: Graph by hand on the grid included on the following page. Use the entire sheet a) Graph the following data as "velocity versus time" using the directions in Graphing Procedures. Time t seconds Velocity v meters/second 15.5 26 53 64.5 85.5 105 124 10 12 b) Find the slope at two (2) different locations using different size triangles and the rise /run. Include the units. Show...

  • This is C++ programming. Create the following files: point.h – contains the definition for the point...

    This is C++ programming. Create the following files: point.h – contains the definition for the point struct. A point consists of an x and y coordinate line.h – contains the definition and prototypes for the line class. A line consists of two points. Getters and setters are not required. However, you do need: 1. A constructor 2. A slope method, which returns the slope of the line 3. An intersect with method, which calculates, and returns, the point of intersec-...

  • I need help on the last problem! I provided all the information though, in case it...

    I need help on the last problem! I provided all the information though, in case it was needed. For all of the graphs below use a vector x ranging from 0 to 10 in steps of 0.1. Create two additional vectors using the following formulas: yp=x.^2.5 and ym=x.^(-2.5); [7;5] Plot yp and ym on a single plot controlling the line color and style (your choice). Put a symbol and text string at the point where the two lines cross (Create...

  • NEED HELP WRITING THE CODE STEP 4.. Step 3: Hypothesis Test for the Population Mean (I)...

    NEED HELP WRITING THE CODE STEP 4.. Step 3: Hypothesis Test for the Population Mean (I) A relative skill level of 1420 represents a critically low skill level in the league. The management of your team has hypothesized that the average relative skill level of your team in the years 2013-2015 is greater than 1420. Test this claim using a 5% level of significance. For this test, assume that the population standard deviation for relative skill level is unknown. Make...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT