+ Reply to Thread
Results 1 to 2 of 2

Linear Trendline Proximity Problem

  1. #1
    Registered User
    Join Date
    01-29-2010
    Location
    Vancouver, Canada
    MS-Off Ver
    Excel 2007
    Posts
    47

    Linear Trendline Proximity Problem

    Hi All,
    I have an engineering problem that I'm trying to solve, but I can't seem to wrap my head around how to accomplish it in Excel. For starters, this is going to be a template that can be used in the future for less technically inclined people so it needs to function with minimal user input or interpretation.

    I am plotting two arrays of data on a scatter plot (Velocity of Flow [v] and Hydraulic Gradient [i]). The data will form a linear trend if the data points represent laminar flow of water. Data that falls outside the linear range is because the flow is Turbulent (data point). There will be ten trials (ie: data points), and I need to determine which ones are turbulent and which are laminar. To me this seems like an iterative process. I need a linear trendline that only includes laminar data points, and I determine which are laminar based on how far away from the trendline they are (circular reference). Attached is a sample data set (only 8 points), with my personal interpretation of which data points are turbulent and which are laminar.

    My original thought was to use the FORECAST function and determine how far from the trendline the data point is, but the turbulent data points group together and then "drag" the trendline closer to them.

    Help is much appreciated.

    Constant Head Permeability.xlsx

  2. #2
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,819

    Re: Linear Trendline Proximity Problem

    It might be an iterative problem, it will probably depend on exactly how you decide to approach it. I think it will be even more complicated the more "decision making" that Excel does and the less that the user does.

    My first thought on something like this is to make it first a statistics problem before we make it a programming problem. Since you want to minimize user input, I think you are going to want a fairly robust algorithm for detecting outliers. I would probably suggest that you start with Wikipedia (https://en.wikipedia.org/wiki/Outlier ) or any other suitable statistics text to become familiar with some of the different outlier tests. I see Grub's test frequently mentioned for testing outliers in linear regression problems, so that might be one to explore. Note that, to my knowledge, Excel does not have any of the outlier tests preprogrammed in, so you will likely need to program your own implementation of the outlier algorithm. I expect that this will be the hardest part of the overall spreadsheet. I'm sure we can help you with this, but you will probably need to be familiar enough with your desired outlier test to help us understand it enough to program it. You might also look at this website (http://www.real-statistics.com/multi...d-influencers/ ) since most of his examples are specifically for statistics in Excel.

    I am not an expert in fluid mechanics, but I seem to recall that the Reynold's number was the usual quantity used to draw the line between turbulent and laminar flow. Reynold's number might be easier to calculate than an outlier test -- if it can be reliably used in your situation.

    Most of Excel's regression functions are not going to like a "variable" size data set. I would expect that you will want to be able to use the LINEST() function when all is said and done here, because the LINEST() function will output several different statistics that will likely be useful in the regression task. (help file for the LINEST() function https://support.office.com/en-us/art...a-fa7abf772b6d ). Once an algorithm is chosen and implemented for testing for outliers, we will need an algorithm that will extract those points from the input ranges to the regression function. That will also likely be a challenge.

    Overall "flow chart" for this:

    1) User inputs data.
    2) Perform regression.
    3) Test for outliers.
    4) Remove outliers from data set.
    5) If needed/desired, return to (2) and repeat loop until satisfied with the result.

    I would probably recommend that you "divide" and conquer -- identify the steps that you are not show how to program into Excel, and let's focus on smaller chunks of the problem.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Excel: Can I force a linear trendline through the origin?
    By Bill in forum Excel Charting & Pivots
    Replies: 7
    Last Post: 04-14-2018, 08:24 PM
  2. [SOLVED] Linear trendline:wrong equation
    By Jan M. in forum Excel Charting & Pivots
    Replies: 13
    Last Post: 09-28-2016, 02:09 PM
  3. Replies: 4
    Last Post: 08-19-2015, 11:30 AM
  4. How do I get my linear trendline to stop at zero?
    By HaileyGoddard in forum Excel Charting & Pivots
    Replies: 5
    Last Post: 08-06-2013, 02:22 PM
  5. Excel Linear Trendline Query
    By frcrilly in forum Excel General
    Replies: 4
    Last Post: 02-19-2011, 10:51 AM
  6. Linear Trendline
    By maperalia in forum Excel Charting & Pivots
    Replies: 5
    Last Post: 05-04-2006, 06:30 PM
  7. Linear Trendline Equation Question
    By QuestGAV in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 10-10-2005, 10:25 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1