# Polynomial Regression on Simulation Data

Budget $10 -$30 USD
Bids 1
Average Bid \$25
Status Closed

Function : y=[url removed, login to view]+[url removed, login to view]^{2}-3 * 10^{-5}x^{3} + \epsilon

Generate 50 training data points: (x,y).

Generate 10000 testing data points: (xtest, ytest).

Use function lm(y ∼ poly(x,i)) to train your model, here i is the flexibility from 1 to 20. Hint: you can use for loop for this step. And repeat this whole process 30 times.

Calculate the Training MSE for each flexibility, in total you should have 20×30 MSE.

Calculate the Testing MSE for each flexibility, in total you should have 20 ×30 MSE.

Calculate the Average MSE for the 20 Training MSE.

Calculate the Average MSE for the 20 Testing MSE.

Use plot() function to draw average Training MSE.

Use lines() function to draw all your Training MSE and Testing MSE in one figure. You can use for loop to draw all lines.

Please point out the first MSE for both Training and Testing by using points() function.

Please point out the lowest MSE for Testing and the corresponding Training MSE by using points() function.

Please point out the last MSE for both Training and Testing by using points() function.

## This project was awarded to

### Joe156

This project has been the best experience I've had on Freelancer. Joe is easy to work with and extremely responsive to inputs and questions. This project involved implementing a Kalman filter with multiple parameters over noisy financial data. Joe's updates were presented in a fantastic and easy-to-digest format, which made collaboration easy going forward. I HIGHLY recommend Joe for any project involving R, times series, signal processing, filtering... or anything that requires some heavy mathematical lifting.

Familiar with statistical modelling, data analysis, financial research. Programming skill: SAS, R, Matlab

### Looking to make some money?

• Set your budget and the time frame