Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In C, For purposes of this assignment, let's initialize our data set to contain the following points. Later we may modify this program to read

In C,

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

For purposes of this assignment, let's initialize our data set to contain the following points. Later we may modify this program to read data points from an input file.) Note that the poi (y,t) represents the position of an object in meters at time t. Table 4.3 Time and position for a moving body. t (seconds)03 5 8 10 125 18 y (meters) 2 5.2 6 10 104 3.4 14.818 Program 2 - Linear Regression A more powerful technique for estimating linear data is called linear regression. The simplest form is linear regression for two variables, a model in which one variable is expressed as a linear function of the other. Let's use the same data set we used in the linear interpolation problem above, but this time we'll find the best line fit through those points using linear regression. 18 16 14 12 2 10 10 12 14 16 18 6 0 t (seconds) Here we have the same data set as we used before, but we are now fitting a straight line through those points instead of interpolating between adjacent points. Of course, a straight line is given by the equation: where, in this case, y represents the meters traveled (vertical axis) and t represents the time value (horizontal axis). Note that the only unknowns in this equation are b, the x intercept, and v, the slope of the line. These are called the regression coefficients and may be calculated with the following formulae: where n represents the number of data points, yu represents the mean value of the positions (meters) and tu represents the mean value for the times. This is common method of calculating the intercept and slope of a line is called the least squares method. Deliverables Write a C program that calculates the regression coefficients for the above data set and reports them to the user. In addition, determine the position value (y) for time- 11 seconds using your regression coefficients and report that well. v=xx.xx y - XX.XX at time 11 seconds

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle 10g Database Administrator Implementation And Administration

Authors: Gavin Powell, Carol McCullough Dieter

2nd Edition

1418836656, 9781418836658

More Books

Students also viewed these Databases questions