Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In MATLAB Use anonymous functions to compute Sxx and Sxy x = [161, 203, 235, 176, 201, 188, 228, 211, 191, 178]; y = [159,

In MATLAB

  • Use anonymous functions to compute Sxx and Sxy
  • x = [161, 203, 235, 176, 201, 188, 228, 211, 191, 178];
  • y = [159, 206, 241, 163, 197, 193, 209, 189, 169, 201];
  • Plot the data (circles, no connecting lines)
  • Also plot the line (no points need printing, line only) yhat = b0 + b1*x where
    • b1 = Sxy/Sxx
    • b0 = Avg(y)-b1*avg(x)
  • Obtain errors = yhat-y
  • Obtain the sum of squares of errors and print labelled as SSE
  • Use functions such as sum and mean to help
  • Publish in the usual way
  • OTHER HINTS
    • The number of components in x or y can be obtained using length(x) or length(y)
    • The average of x can be obtained using mean(x), same for y using mean(y)
    • The array yhat uses the x array to make a prediction for each value of y. As shown above once you have b0 andb1 (both scalars) yhat = b0 + b1*x.
    • The large formulas involving sigmas: the symbols represent summation of the terms.
  • formula for Sxx and Syy is sum(v.^2)-length(v)*mean(v), v being the variable

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

Graph Database Modeling With Neo4j

Authors: Ajit Singh

2nd Edition

B0BDWT2XLR, 979-8351798783

More Books

Students also viewed these Databases questions

Question

4. Are there any disadvantages?

Answered: 1 week ago

Question

3. What are the main benefits of using more information technology?

Answered: 1 week ago

Question

start to review and develop your employability skills

Answered: 1 week ago