# Question:How to remove noise from data?

## Question:How to remove noise from data?

Maple

I want to write a code to eliminate the noise in the data, but am unfamilar with how to do it.  This is the data:

bdata:=[[8,15],[0,18],[0,19],[-1,20],[-9,23],[0,19],[-2,20],[4,17],[-3,19,],[-1,20],[6,16],[6,17],[-2,20],[-8,23],[-2,19],[0,18],[-6,21],[-6,21],[7,16],[-9,22],[5,16],[-9,23],[-7,22],[-2,20],[4,17],[5,17],[-2,19],[-1,20],[-6,21],[5,16],[6,17],[2,17],[0,18],[5,16],[-2,20],[7,16],[-2,20],[1,18],[0,18],[-8,29],[-9,27],[-10,32],[-6,28],[7,11],[5,9],[8,7]]:

This is what I've gotten so far:

>bdata:=[[8,15],[0,18],[0,19],[-1,20],[-9,23],[0,19],[-2,20],[4,17],[-3,19,],[-1,20],[6,16],[6,17],[-2,20],[-8,23],[-2,19],[0,18],[-6,21],[-6,21],[7,16],[-9,22],[5,16],[-9,23],[-7,22],[-2,20],[4,17],[5,17],[-2,19],[-1,20],[-6,21],[5,16],[6,17],[2,17],[0,18],[5,16],[-2,20],[7,16],[-2,20],[1,18],[0,18],[-8,29],[-9,27],[-10,32],[-6,28],[7,11],[5,9],[8,7]]:

`> with(CurveFitting);`
`> with(plots);> plot([tdata, LeastSquares(tdata, x)], x = -12 .. 10, style = [point, line], color = [red, blue]);`
` `
`From here I can see which points are the noise, but I don't know how to write a code to get rid of the extreme ones. `
`Any help would be appreciated!!`
﻿