# Line of best fit - for logarithmic-like dataset

1. Aug 4, 2014

### Phystudent91

Hi all,

Firstly, hope I'm posting in the right place!

I'm working with a company that works with air filters. Without going into specifics etc, I have 4 data points:

| x | y |
|0mm|21%|
|150mm|59.6%|
|300mm|83%|
|550mm|90%|

where x is Filter Height and y is Filtration.
(Apologies for bad formatting - I looked but couldn't find the syntax anywhere for posting in a table!)

In the title, I've called it 'logarithmic-like' and what I mean by that is that it will not go above 100% (obviously) and looking at the data points, it's got a definite exponential fall off.

21% at 0mm I know sounds wierd, but it's a characteristic of the system which, through laziness and some contractual NDA stuff, I won't go in to.

I've used 3 different graph-drawing softwares (Excel, JMP 11 and graph) + WolframAlpha and have come to the conclusion that it isn't possible to alter the curve of a logarithmic plot enough to fit this data.

I've also tried flipping the data and an exponential won't fit - x^2 does, but doesn't asymptote at 100%, so isn't really accurate enough. Increasing the power just makes any graphical software peak between the 1st and second points and then rise to the rest.

TLDR;

I have this data set (above) and I'm attempting to find a line of best fit so that we can design a unit and "know" what filtration it will give. Can anyone help me with a way of finding a formula that fits or a piece of software that will?

2. Aug 4, 2014

### mathman

One method that might work is to add one more data point: x=1 billion, y = 100%.

3. Aug 5, 2014

### da_nang

You could try modeling it with $y = 1 - (1 - a_1)e^{-a_2 x}$ and perform a nonlinear fit to estimate the parameters. And if you know that $f(0) = 0.21$ then you know one of the parameters, $y = 1 - 0.79e^{-a_2 x} , a_1 = 0.21$.

4. Aug 10, 2014

### haruspex

You could make it linear:
ln(1-y) = ln(1-a1) - a2x
Plot ln(1-y) against x.