Line of best fit - for logarithmic-like dataset

  • Thread starter Phystudent91
  • Start date
  • Tags
    Fit Line
In summary: If the line is a straight line, then y = a1 + ln(1-y) . If the line slopes downwards, then y = a1 - ln(1-y) .
  • #1
Phystudent91
6
0
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?

Thanks in advance!
 
Physics news on Phys.org
  • #2
One method that might work is to add one more data point: x=1 billion, y = 100%.
 
  • #3
You could try modeling it with [itex]y = 1 - (1 - a_1)e^{-a_2 x}[/itex] and perform a nonlinear fit to estimate the parameters. And if you know that [itex]f(0) = 0.21[/itex] then you know one of the parameters, [itex]y = 1 - 0.79e^{-a_2 x} , a_1 = 0.21[/itex].

ExpNonLinFit1407220716.png
 
  • Like
Likes 1 person
  • #4
da_nang said:
You could try modeling it with [itex]y = 1 - (1 - a_1)e^{-a_2 x}[/itex] and perform a nonlinear fit
You could make it linear:
ln(1-y) = ln(1-a1) - a2x
Plot ln(1-y) against x.
 
  • #5



Hello,

Thank you for reaching out and providing the details of your data set. From what you have described, it seems like your data follows a logarithmic-like trend, where there is an exponential decrease in filtration as filter height increases. This is a common trend in many scientific and engineering applications.

In terms of finding a line of best fit for this type of data, there are a few options you can try. One approach is to transform your data so that it follows a linear trend. This can be done by taking the logarithm of both the x and y values, and then plotting the transformed data. This will give you a straight line that can be used to find the slope and intercept, which can then be used to create a logarithmic equation for your data.

Another option is to use a non-linear regression analysis, which takes into account the non-linear nature of your data. This can be done using software such as R, Python, or MATLAB, which have built-in functions for non-linear regression. These programs also allow you to customize the type of equation you want to fit to your data, so you can try different types of logarithmic functions until you find the one that best fits your data.

I hope this helps and good luck with your analysis! If you have any further questions, please don't hesitate to reach out.
 

What is a line of best fit for a logarithmic-like dataset?

A line of best fit is a straight line that represents the trend of a set of data points in a logarithmic-like dataset. It is the line that comes closest to all of the points in the dataset and helps to visualize the relationship between the variables.

How is the line of best fit calculated for a logarithmic-like dataset?

The line of best fit is calculated using a mathematical method called least squares regression. This method minimizes the sum of the squared distances between the data points and the line, resulting in the best fit line for the dataset.

What is the significance of the line of best fit in a logarithmic-like dataset?

The line of best fit helps to identify the general trend or pattern in the data. It can also be used to make predictions and estimate future values based on the relationship between the variables in the dataset.

How do you interpret the slope and intercept of the line of best fit in a logarithmic-like dataset?

The slope of the line of best fit represents the rate of change between the variables. A positive slope indicates a positive relationship between the variables, while a negative slope indicates a negative relationship. The intercept represents the value of the dependent variable when the independent variable is equal to zero.

Can the line of best fit be used to make accurate predictions for a logarithmic-like dataset?

Yes, the line of best fit can be used to make predictions for values within the range of the dataset. However, it may not be accurate for values outside of the range as it is only an estimation based on the data points in the dataset.

Similar threads

  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
14
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
3K
Replies
7
Views
22K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
14
Views
10K
  • General Engineering
Replies
2
Views
7K
Replies
2
Views
2K
  • Introductory Physics Homework Help
Replies
3
Views
3K
Back
Top