Trading Systems | MAR 2005
What’s The Difference by John F. Ehlers
Stocks & Commodities V. 23:3 (28-29): What’s The Difference by John F. Ehlers What’s the difference between the median and the average? It’s what drives this new adaptive smoothing filter. Remember back in school when your teacher asked you what the difference was between the median and the average? I remember thinking, “Yeah, what is the difference?” as in, “Who cares?” As it turns out, you should care. It is exactly that difference that drives a unique new adaptive smoothing filter that I’m going to tell you about. Average and median filters eliminate extraneous data in fundamentally different ways. An average folds “noise” in with the signal so that if enough points are selected, the noise is reduced by summing to its own (nearly) zero average value. On the other hand, a median filter eliminates noise by ignoring it. A big spike in the data has no impact at all on the median signal value. Median filters are used in video to eliminate impulsive, or “salt and pepper” noise on the picture. We will exploit these characteristics to create an adaptive smoothing filter. THE DIFFERENCE IS… Consider a dataset that consists of 10 ones. Both the average and the median of this dataset is 1. Next, let’s move that dataset forward as we would with a moving average, dropping the last old data sample and adding a new one. Assuming the value of the new data sample is 10, then the new average will be 1.9 (nine ones and one 10, divided by 10). On the other hand, the median of the new dataset still remains unchanged at 1. A median filter ranks all the samples within the filter and selects the middle one as the filter output. So there is a difference between median and averaging filters. That percentage difference becomes less as the respective filter lengths are made shorter.
by John F. Ehlers
Technical Analysis of STOCKS & COMMODITIES
The Traders’ Magazine since 1982
has had over 1,226,237 subscribers from 174 different countries.
37,000 Page Traders’ Archive for $89.99
To continue reading, sign-up for trial access to Traders.com and the S&C Archive — 37,000 pages of trading ideas!
After verifying your email address, you will have limited access to the S&C Archive, as well as access to a Digital Edition of S&C, and access to Traders.com Advantage and Working Money for 30 days.
Not a subscriber to Technical Analysis of
STOCKS & COMMODITIES magazine?
Click
here to subscribe, or request
a trial subscription.
Log-in now to view articles from the S&C Archive.
Your Subscriber ID is located at the top of your magazine label, highlighted here in red.
Your last name can be found on the second line, highlighted here in blue.
*If you have a company name on the label, that can also be used. It will appear below your name on the label.
If you do not have a Subscriber ID on your label, you can find it on your statement or renewal form.
For help locating your Subscriber ID number, please call us at 1-800-832-4642 or send an email to Survey@Traders.com. If sending an email, please include your name and mailing address.