**data smoothing** This is a topic that many people are looking for. **newyorkcityvoices.org** is a channel providing useful information about learning, life, digital marketing and online courses …. it will help you have an overview and solid multi-faceted knowledge . Today, ** newyorkcityvoices.org ** would like to introduce to you **Maths Tutorial: Smoothing Time Series Data (statistics)**. Following along are instructions in the video below:

“And gentlemen. It is the most patriotic week of the year for north america. I i failed to mention it before nbut sunday was canada day so happy canada day nmy canadian viewers. What s your favorite canada day tradition.

I think mine is the moose rides this is random. But i happen to have a canadian n. 5. Bill in front of me.

If you ve never handled ncanadian money. It is weird this is bizarre. It s like plastic you can see through it there s astronauts on it i didn t even know canada went to space. I didn t even know canada knew that there was a space to go into okay.

That i don t know nwhat that joke was about it was being needlessly hurtful frank can i unsubscribe because of it this feels less like money and more like a drink ticket that you would get at a fancy gala event. Like and then of course wednesday tomorrow is the fourth of july nhere in the united states. Where we celebrate being independent from great britain and of course. We fought a war to do it and canada just kind of said and great britain was like in my limited view of nhistory that s how it went.

I m very pro america nokay. Very pro america i m actually gonna shoot a gun noff right through my window all right after this filming is done that s how american i am. But when you think about it it s like were they njumping to conclusions when they decided to fight nthe revolutionary war were they like no we did that oh my gosh i am such an idiot they are taxing the heck out of our tea. I m not standing for this we ve got the stamp act.

Where we re supposed nto pay for stamps now what else what else is gonna happen gosh darn it i m gonna nfight these monkey fudgers and get them out of here nwith their red coats. So they fought and now here. We are here we are better than ever you know the thing. I like about canada or at least stereotypically is that they say ncanadians are very polite and i m very polite and i tend to think that as much as i love the nunited states.

My homeland americans are pretty rude. They re pretty loud nand. Rude and obnoxious and not the easiest npeople to get along with especially on the east coast. Where i live like in the midwest.

They might nbe a little more tolerable on the west coast. They re more laid back. But where i live on the east ncoast of the united states people are uptight and nrude and very loud so i wonder in canada are npeople really more polite. I think there s gotta nbe.

A personality test which shows you where like what country would be best suited to your personality. A soft sensitive person nlike me emphasis on soft let s bing. It guys who uses bing. Man.

What country is my personality. Oh 16personalities has one let s see. What that s all about regional maps. Let s nlook at united states okay.

So they have the ntop extraverted states and top introverted states interesting clearly new york and california are gonna be the top extraverted states cause those people are frickin weird top introverted west virginia vermont. I ve been there a few times. Vermont s fairly introverted new mexico let s take a look intuitive versus observant ni guess that s n versus s. Vermont is the most intuitive state maybe i should move to vermont.

Vermont just. Announced this thing where they ll give you. N 10000. To move.

There that s tempting west virginia. Is an intuitive state maybe i should move to west virginia top observant states north dakota huh kansas. Who would have known all right thinking versus feeling top thinking states nevada cause you ve gotta nthink as you re gambling. Florida cause.

All the old npeople are there thinking and then top feeling states oh utah look at that that s pretty big 60 is that all the mormons out there they re very feely. Vermont again that 10000. Is calling my name that s interesting do they have it for countries. Too let s look at europe top introverted lithuania faroe islands.

I don t neven know what that is so it seems like the balkan narea is very extraverted for some reason introverted countries lithuania. It seems like the baltic ones. Lithuania latvia estonia those are very introverted interesting i m seeing some regional patterns. Some patterns.

If you will we ll just look at one more intuitive countries nbosnia montenegro. Serbia. So interesting. We re seeing some more nintuitive people around here as well and croatia too so yeah.

The balkans are once again. The balkans are like nextraverted intuitives top. Observant countries this has gotta be the most nboring thing you ve ever watched watch fj. Look at maps.

.

It s fun guys i promise top observers united kingdom okay sweden and france is nan. Observant country interesting you know australia nyou re getting short shrift. Because like honestly. This part of the map.

Has nlike. Four countries on it let s go to personality atlas. And let s do a quiz and let s see what ncountry. I should move to when america changes nits money to be plastic like canada s all right so here we re ngonna answer.

These questions you put your family first. I m kind of family oriented. People might think someone is a snob. If they saw them with you wait do the oh they change it changes cool let s just put it there cause.

I don t know nwhat people think of me you are someone who always ndoes. What they say they will not really well maybe not that badly okay let me give myself nsome benefit of the doubt you tend to keep to yourself you are someone who takes other people s nopinion into account. When making a decision. Yeah.

This is a clever cleverly designed website. You would do well in a trivia contest. I would i d make a lot of money like that crazy looking guy there. You are someone others would nalways have a good time with let met just make myself nfeel good about myself.

And answer that way this is a poorly worded sentence. You are someone others would nalways have a good time with with the ending with the preposition. It should be you are someone with whom nother have a good time you always have interesting ideas. Yeah.

I do i have such interesting ideas. I am an idea machine you tend to be set in your ways. Well it depends sometimes i am it depends. I m just gonna say ugh ugh ugh ugh.

I ll say a little bit you would jump out of na boat to save someone if they were drowning in nshark infested waters. I would definitely try to help them pains me to say how long is this quiz. You would give up your nseat for an elderly person. Yeah.

I would he looks mad look at this guy he. s like in conversation others. Often nhave interesting things more interesting mumbles um. Not really i m the best you walk to the beat of your own drum uh to a degree you have a well organized closet.

Not really do you have a good sense of humor. Oh yes ha ha ha ha. Ni. m at the comedy club.

With my blond hair and my blue jacket you always say please. And thank you let s see what country am. I colombia in funlandia people in colombia describe themselves primarily as humorous and fun. But also content.

Polite and welcoming you share a similar profile below you can see where nelse. You do or don t fit. As well as where your friends fit oh well they put the map ntogether in a weird way so australia s on top of canada. Germany finland.

This is confusing uh. Where you don t fit. I don t fit in russia in mother russia. I don t fit in germany.

I don t fit in singapore. Well. It s a good thing. I ndidn t wanna live.

There anyway. Where else you fit argentina uk mexico. Oh okay. So they have these things kind of divided up into different regions based on what they re good at.

I understand so guys looks like ni m moving to colombia it was good living in the nunited states while i was here i hope they have internet in colombia. And that they have starbucks old timey piano music uh thanks. So much laughs so thanks so. Much for watching.

I really appreciate it go ahead. And take that npersonality atlas test. And tell me what country you get let me see where we should be living. Where on earth.

.

We should be living. I was hoping that it nwould sort of just say thank you all so much for watching please give it a like if you liked it subscribe. t. Equals.

Three. We d be up to three fourteen point eight seven five so in line with the 2005 along here. I m going to get the average of these two so i want. Fifteen and sixteen added together divided by two which is fifteen point five along this point lining up with the 2006.

I want the two that i worked out either side and then we have those centered four means smooth values so just to recap the 18 21. 13. And 17 or went into giving me. 14 point seven five.

Then the 21 13. 17. And 9 or went into giving me. 15 to get something in the center of all of these lining up with the 2004 marker.

Because now i ve got a group of five see and i m trying to get in the middle. I take these two fourteen point seven five and 15 and i find the middle of them which gives me fourteen point eight seven five. So what does my time series plot look like now here it is with the blue as the original data and the red. There is my four mean smooth data with centering applied and you can see i ve got those five points.

Because i ve lost a couple off the bottom. And the top because of this centering process and now i ve got a very smooth trend happening. And it s very obviously a trend upwards over time for these sales figures now let s take a look at median smoothing. As you might have guessed this technique is very very similar.

It s just that it uses medians instead of means so before where we were finding the average now we re going to find the middle value the median. So we re going to smooth this table of data again only this time. I m going to use groups of three and find the median. So here s my first group of three now with 821 and 13 what s the median it s not 21.

Because you need to put them in order. So in order these go. 8 13. 21.

And the median is 13. So here the median of 8 21. And 13 is 13 in this next group of 3 21. 13.

And 17. What s the median in order. They would go. 13 17.

21. Which means the middle would be 17 for this group. Here. 13.

17. And 9 in order it goes. 9. 13.

Then 17. So this would be my median for this group. 17 9. 25.

This is the bottom this is the top this would be the median for this group. Nine twenty five twenty in order. They go nine twenty twenty five. So twenty is the median and to finish off.

We have twenty five and twenty so on our time series plot this would look like this and you can see the red line. There is our three medians smooth values. But the beauty of median smoothing is you don t really need the table of data to do it in the first place you can do it straight on to the graph by finding medians in a group of three and we already learnt how to do that when we were doing three median regression looking at three points and finding the middle of them vertically and horizontally. It s a very similar process.

So i ve just blown up my graph a little bit here. Let s do this three median smoothing graphically. So the first group of three is these three here because we re going up in time so we re going across the page. So one two three that s my first group of three now going up the page.

What order do i hit them in i hit this one first and then this one second going up the page and then this one third so in a group of three which one s the median. It s the second one so this one along here. Which is at 13 somewhere along that line is the median and the middle of three going across is just going to be 2003. Here.

.

So there is my median point. Now the next three that i hit going across the page is one two three this group here so of this group where s the middle horizontally. It s here and where s the middle vertically. One two three so it s there so right.

There is the median of those ones going across the page. The next group of three is one two three. So that s these ones here the middle of them horizontally is going to be there and the middle vertically one two three puts it there so there s my median point. The next group of three going across the page was one two three so i m talking about this group here.

The middle horizontally is going to be there in the middle vertically. One two three is along there so that s where the median point is next group is going to be these three here the middle going across is somewhere there and the middle going vertically is there so that s where the median point is now i ve got this group of three the middle of them going across lines up with this point. And the middle of them going up lines up with this point. So that would be the median and finally this group here going across the middle is lining up with this point.

And going up the first one. I hit is this one and then i hit that one so aligned up with that one is where the middle is which makes that the median point and now i have some lovely colored dots which i m just going to join up as the final step to do there we go tada and it works much the same way if you re doing five median smoothing instead of three. We re just taking these groups of five and finding the median within that so one two three four five would be my first group going across the page now where s the middle of those horizontally. It s here.

And what about going up the page. The first one i hit is that one that s number two that s number three that s number four that s number five where s the middle of five points. It s going to be the third one so this point. Here is actually the middle going up and going across so that is the median point.

The next group of five would be one two three four five going across so that s the group. I want to find the median of now the median going across is going to be here. And what about going up the page. The first one i hit is that one that would be number two that would be number three that would be number four and that would be number five.

I want the third one in because i m finding the middle. So what do you know the middle horizontally and vertically is that point again next group of five would be one two three four five going across so that s the group we want to find the median of going across the page. This way this point. Here is going to be the middle and going up the page.

Which one do we hit that s the first second third. So we re going to be inline with the third. But along where the middle is horizontally. So this is the next median point.

The next group of five going across would be one two three four five. So that s these ones here the middle going across one two three that s the third. So that s where we re lining up for the x coordinate and for the y coordinate. The first one i hit going up.

The page is this one that would be number two and this would be number three. So somewhere right here is where the middle would be and i m up to the last group now because i ve got one two three four five that s the last group the middle going across is going to be lining up here with the 2008 and the first one i hit going up. The page is that that would be the second and that would be the third. So that there is the median and now i just join up my pretty dots and that s our five median smooth time series plot median smoothing with an even number of points in the group.

Such as for median smoothing is a little bit harder to do straight onto the graph than when you have an odd number like three or five. Because you need to do the centering step with median smoothing. As well when you have an even number. So i ll show you what it looks like from a table.

Let s say. This is my first group of four here. I want eight and 21 and 13 and 17. All to give me the median.

So 8 21. 13. And 17 in order. They go.

8 13. 17. 21. So what s the median.

It s halfway between 13 and 17. So that s 15. So the median here for this group is 15. What about for this group.

Here. 21. 13. 17.

And 9 in order. They would go. 9. 13.

.

17. 21. So the median is going to be between those two again. Which means.

We have another 15 now for this group here. We have 13 17. 9. And 25 in order.

They would go. 9. 13. 17.

25. So our median is 15. Again obviously. This isn t the best example.

Because that won t happen that often that it keeps being the same number. But anyway. Let s persevere so now we have 17 9. 25.

And 20 and we re trying to find the median of those in order. They go. 9 17. 20.

25. So the median is halfway between 17. And 20. Now.

I m doing this group here from 9. To 27 925. 20. And 27 in order goes.

9. 20. 25. 27.

So halfway between 20 and 25 is my median. The last group. I can do is 25 to 19 putting them in order again 19 20. 25.

27. So halfway between 20 and 25 will be my median again. Now the last step here is to smooth them again see how at the 24 point. I ve got a number either side that i ve worked out so what i m going to do is find the median of those two and just like in the last example where i ended up finding the average.

Because i was adding them together and dividing by 2 which gives me the average. But adding them together and dividing by 2 will also give me the median when you ve only got two things. So. The centering step is the same as for median smoothing and means moving.

You add the two together and divide by 2 and that s your centering step. So call it finding the median or finding the mean. When there s only two of them. It s the same thing so halfway between 15 and 15 is just a 15 at 2005.

I m going to have 15 as well at 2006. I m going to be looking at halfway between 15 and 18 point. 5. Which is sixteen point seven five at 2007.

I m looking at halfway between eighteen point five and twenty two point five which is twenty point two five at 2008. I m going to look at halfway between twenty two point five and twenty two point five. Which is just going to be twenty two point two five so now i have my for median smooth values with centering and this part here is the centering i just haven t done that in another column because i m lazy now what does that look like on the graph it looks like this blue is the original data and red is my for median smooth time series with centering you can try and do this straight onto the graph getting your groups of four finding the median maybe do all of that in one color and then find the median of your two new median points in a different color. So you can do it straight onto the graph it just gets a little bit confusing so when would use mean smoothing and when would you use median smoothing well just like in the rest of the core means are a pretty good measure of center.

But they re heavily affected by extreme values outliers. So if you do have something a really big fluctuation in your graph you d be much better off. ” ..

.

Thank you for watching all the articles on the topic **Maths Tutorial: Smoothing Time Series Data (statistics)**. All shares of newyorkcityvoices.org are very good. We hope you are satisfied with the article. For any questions, please leave a comment below. Hopefully you guys support our website even more.

description:

tags: