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...

  • 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...

  • 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...

  • 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 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...

  • In c++ visual studio Write a program that does the following: Reads the input data set...

    In c++ visual studio Write a program that does the following: Reads the input data set from file named "data.txt". Assume that the input file contains x and y values as shown in the sample to the right (the first number in each line is the x value). The number of data points in the input file is not known but assume that they will not exceed 100. Once it gets the data in two one-dimensional arrays (x and y),...

  • The following table shows the annual number of PhD graduates in a country in various fields....

    The following table shows the annual number of PhD graduates in a country in various fields. Natural Sciences Engineering Social Sciences Education 1990 70 10 60 30 1995 130 40 120 50 2000 330 130 280 120 2005 490 370 460 210 2010 590 550 830 520 2012 690 590 1,000 900 (a) With x = the number of social science doctorates and y = the number of education doctorates, use technology to obtain the regression equation. (Round coefficients to...

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
ADVERTISEMENT