How do I make a best fit line on a scatter plot?

I have a set of data and I made a scatter plot on numbers, but how do I put a best fit line in there?

select the graph, then open the Charts Inspector.
Open the series section (from the options at the top "Chart", "Axis", "Series"), Then select the "Trendline" in the "Advanced" section near the bottom.  Finally select the type of trendline

Similar Messages

  • How do you make a horizontal average line in a scatter plot?

    In any version of Numbers, is there a way to make a horizontal average trendline?  Not a "moving average", but one line that is the average that goes through the data points on a scatter plot.

    sflakg wrote:
    hit a few roadblocks. 
    I tried:
    1. using the crop tool to make the canvas bigger with a transparent background.
    2. Used lasso tool over people in group shot (total of 5) and saved the selection
    3. Tried content aware scale to raise the image, but it keeps stretching out the people. 
    Any thoughts on what else I could try?
    Rather than trying to stretch it taller, try to squeeze it horizontally.  There are methods for telling it what to protect in the image if it gets touchy.
    Another possibility is to use Content Aware Fill to make up part at the top and bottom, without any stretching.
    -Noel

  • Other lines parallel to a Best fit line on a scatter graph?

    Can you put Lines of equal gradient to the best fit line on a scatter graph going through to points furthest above and below the best fit line?

    Simplified a bit so I am not so ashamed
    I2=SLOPE(C2:C9,B2:B9)
    I3=INTERCEPT(C2:C9,B2:B9)
    Y Linear (column D) =$I$3+B2×$I$2
    Y - YLinear (column G) is what it says
    Max Line (column E) = $D2+MAX(G)
    Min Line (column F) = =$D2+MIN(G)
    You have to format the "trend" lines with connecting lines and no data symbol

  • Best fit line

    regarding a graph made from spreadsheet data...
    how do i make a best fit line to a set of points?
    also, is there a way to find the slope and intercept of this line?
    Thank you!

    Hello
    The named functions are not available in AppleWorks.
    One way to mimic them is to use AppleScripts .
    Here is an old one which calculate the slope.
    --{SCRIPT}
    tell application "AppleWorks 6"
    activate
    tell front document
    set laSelection to get object specifier of the selection
    set debutCible to name of first cell of laSelection
    -- nom de la première cellule cible
    -- • name of first dest cell
    set premColonne to item 1 of (index of first column of laSelection) as list
    set premRangee to item 1 of (index of first row of laSelection) as list
    set dernColonne to item 1 of (index of last column of laSelection) as list
    set dernRangee to item 1 of (index of last row of laSelection) as list
    set nb_Rangees to dernRangee - premRangee + 1
    if not (dernColonne - premColonne) = 1 then error 8088
    set cell11 to name of row premRangee of column premColonne
    set cell12 to name of row dernRangee of column premColonne
    set cell21 to name of row premRangee of column dernColonne
    set cell22 to name of row dernRangee of column dernColonne
    set vX to get select (cells cell11 thru cell12)
    set the clipboard to vX
    set vY to get select (cells cell21 thru cell22)
    set nb to count of vX
    set {X, Y, XY, x2} to {0, 0, 0, 0}
    repeat with i from 1 to nb
    set xi to vX's item i
    set yi to vY's item i
    set X to X + xi
    set Y to Y + yi
    set XY to XY + (xi * yi)
    set x2 to x2 + (xi * xi)
    end repeat
    set slope to (XY - (X * Y) / nb) / (x2 - (X * X) / nb)
    select menu item 4 of menu 3 (* copier *)
    set slope to my calcule(nb_Rangees)
    display dialog "" & slope
    end tell
    end tell
    on calcule(nb_)
    tell application "AppleWorks 6"
    activate
    set AWversion to (version as text)
    select menu item 2 of menu item 1 of menu 2 (* Nouveau tableur
    • New spreadsheet *)
    tell front document
    select cell "A1"
    select menu item 5 of menu 3 (* Colle • Paste *)
    set formula of cell "C1" to "=A1*B1"
    set formula of cell "D1" to "=A1^2"
    select cell ("C1..D" & nb_)
    select menu item 3 of menu 5 (* Recopier vers le bas
    • Fill down *)
    if AWversion starts with "FU1-" then
    set formula of cell "E1" to "=(SOMME(C1..C" & nb_ & ")-SOMME(A1..A" & nb_ & ")*SOMME(B1..B" & nb_ & ")/NOMBRE(A1..A" & nb_ & "))/(SOMME(D1..D" & nb_ & ")-SOMME(A1..A" & nb_ & ")^2/NOMBRE(A1..A" & nb_ & "))"
    else
    set formula of cell "E1" to "=(SUM(C1..C" & nb_ & ")-SUM(A1..A" & nb_ & ")*SUM(B1..B" & nb_ & ")/count(A1..A" & nb_ & "))/(SUM(D1..D" & nb_ & ")-SUM(A1..A" & nb_ & ")^2/count(A1..A" & nb_ & "))"
    end if
    set slope_ to cell "E1"
    end tell
    close document 1 without saving
    end tell
    return {slope_}
    end calcule
    --{/SCRIPT}
    Yvan KOENIG (from FRANCE mercredi 1 août 2007 06:51:46)
    edit:
    When I edit my message, the script appears but when I look in the forum it doesn't appear.
    It appears that it is a recent "feature" of this forum;
    I made a last attempt.
    If it doesn't work, you may send a mail to
    koenig then a dot then yvan then an @ then tele2 then a dot then fr
    I will send you the script as a mail attachment.
    Yvan KOENIG (from FRANCE mercredi 1 août 2007 07:07:17)
    Message was edited by: KOENIG Yvan

  • How do i find where 2 best fit lines cross?

    Hi
    I was wondering if anyone knows a way to find where 2 best fit lines cross, I don't have the equation for the lines and i'm not sure if I can get it.
    I currently have the program tracing the lines and comparing y values however it will only increment in steps of 0.1 on the x-axis and i need an accuraccy of 0.0001

    If you have or can get a series of XY value pairs for both of the lines, getting the equation of the line is as simple as calling Linear Fit.vi.  Once you have the equations of both lines, the intersection is simple algebra, subject to the accuracy of your fit.  If the XY data pairs describe a curve, not a line, and you want more accuracy, you can try a polynomial fit using General Polynomial Fit.vi.  To find the intersection, set one polynomial equation equal to the other, compute the coefficients of the resulting polynomial equation, and find the root using Polynomial Roots.vi.  All this assumes you have a Pro or better version of LabVIEW.  If you don't, you can still do it, but you will need to write some code for the fits and roots.  Check out a copy of Numerical Recipes in C, by Press et. al. from your local library and it will give you the equations for all the above.  With LabVIEW's native matrix handling capabilities, the rest is straighforward.
    Let us know if you need more help.
    This account is no longer active. Contact ShadesOfGray for current posts and information.

  • Is it possible to apply a best fit line to charts?

    The topic pretty much says it all, I have a scatter chart that I need to apply a best fit line to in order to make a general slope assumption. Is it possible to do this, and if so how?
    Also, I can't seem to put a label on my X and Y axis'. I have the number increments that I need, but I need to give them a name. For example, the x-axis needs to be Volume in mL and the y-axis needs to say Mass in grams. Is it possible to do this?
    Thanks very much in advance to anyone who can help.
    Daniel

    The charting function in the iWork suite is fairly rudimentary -- there is no functionality for doing regression or best-fit lines, and the axes labels have to be created by hand.

  • "best fit" lines

    I have a basic line graph that shows the spending $ trend of three business units over time (5 year history at month level). I'd like to add "best fit" lines to make it easier for end users to discern the trend without all the hills and valleys. How do I accomplish that in 11g? I haven't seen any graph that adds this by itself, so I'm assuming I need to calculate a new "best fit" metric or something?
    Thanks,
    Scott

    Here's a visual example. Column C creates a 3-point moving average that is plotted along with the data values. I'll send you the example. You can create any equation that you'd like depending on your use.
    Regards,

  • Is it possible to show a best fit line

    i am plotting percent fructose V.S density and trying to do a best fit line. A connect the dots jagged line would not be appropreate. Is it possibleto do this?

    Short answer: No. Wait to see what the next version brings. The only real work-around is to add a data set using the same x values and new y values, predicted from the linear regression. You would then have to draw a line over the resulting plot points manually. Then, "hide" the extra data set by eliminating the data point fill and outline.
    Only help I can offer is to look in your Utilities folder for an app named "Grapher." It can do everything you ask (and then some) and also produces high quality graphs as well (which can be copied and pasted into other apps in a variety of formats). Best of all, it's free and you probably already have it. It plots both discrete data sets as well as true functions. And yes, it will do linear regressions (and power, exponential, polynomial, and "custom" ones as well).
    Unfortunately, iWork's charting abilities are best described as "laughably pathetic." In stead of revolutionizing the charting aspect of spreadsheets, Apple chose to follow in M$'s footsteps, aka the path of a sado-masochistic CPA or "the Excel way." In essence, Numbers is only capable of producing what I call "bin count" charts (as in pie charts, bar graphs, and line/area charts). The "scatterplots" Numbers produces are really a hacked version of bin count charts. As such, they are basically useless for real scientific/engineering/mathematic plots. In fact, it does them so badly, I'm surprised the "scatterplot" option even made the cut for the final release.
    Things that breaks/cripples Numbers' "scatterplot":
    • No control over range of axis. "Value Axis Format" controls don't function properly/always remain blank and there is only one set of values for both axis (just like a bin count chart, whose "x axis" has no real, numerical value; so, doesn't need any controls). And there is no way to lock the scale of the axis so, for example, 10 units on the x axis is the same physical distance as 10 units on the y axis.
    • Axis grid divisions are only allow to be integers between 1 and 10 (which only makes sense for a bin count plot).
    • No 3D, log, log-log, ln, ln-ln, cylindrical, or spherical plots.
    • No true function plots. And there is no way to connect points, it only plots discrete data sets.
    • No control of data point marker sizes, only the fill/outline color and outline thickness.
    • Chart legend gets it's text from the independant variable (aka x values) column title, not the dependant (y value) column title, like it should. (Something that only makes sense on a bin count chart, which usually only have one column of data per data set.)
    • Each data set must come from adjacent pairs of columns. (You can't have one set of x values for a table of multiple y values.)
    • No way to control the size of the plot area itself (only the overall size of the chart rectangular area, which includes the axis text). So you can't fake a line chart as an overlay over a scatterplot, there's no way to align them.
    • Only does linear regressions directly (and then you have to put it together from pieces). No exponential, log, ln, power, or polynomial fits.
    • Charting brings Numbers to it's knees as far as speed is concerned.
    • I haven't found a way to ADD a data set to chart, it always seems to replace the data already plotted (or am I missing something or fighting a bug?).
    Heck, there isn't even error bars on it's financial charts, so you can't even do a simple high-low-close stock price tracking, line chart. Other than that, it you want a 2 1/2D pie chart with wood grain texturing, Apple's got you covered!
    Scott
    P.S. Just in case those of you reading this think I'm an Apple/Numbers hater, you couldn't be more wrong. I'm a huge fan of Numbers and it has permanently bumped Excel off of my dock. (I just don't use it for charting.) I call'em like I see 'em. And Apple can't fix it if they don't know it's broken.

  • Log scale of the axis and the best-fit line

    I try to plot a graph and set the scale of the x-axis to log scale and then i try to plot a linear trendline (best fit line). but the linear trendline does now show on the graph. but if i set the axis scale to linear, then the trendline does show.  i will need my graph in the log scale and also a linear best fit line. please help me out

    0
    100
    3.00E-09
    71.52
    1.00E-08
    57.3
    3.00E-08
    39.15
    1.00E-07
    24.13
    3.00E-07
    14.77
    1.00E-06
    7.22
    i meant you these data, and left column is x-axis and gonna use log scale for the axis. the right column is the y axis. and then i need a best fit line for this graph.. hope you can help me

  • Best fit lines for loops and sine waves

    I am trying to find a best fit line that will work for sine waves and loops (hysteresis loops). I can get the sine wave just fine, but when I switch to a hysteresis it just puts a line across the middle (I assume because of the 2 y values for every x). I am doing data acquisition that will take in both forms and graph them. I tried a polynomial fit and it doesn't work at least the way I implemented it and I tried a few others but it looks like they are all function based. Also, my y values are coming out of a Bessel filter. I don't think this would be affecting anything but I thought I would put it in here incase it does.
    Did I miss one that I haven't tried that works for my application?
    Thanks
    Patrick

    RiversDaddy wrote:
    ... currently I am doing it by looping and reducing the error towards zero to fit the amplitude and phase. (I know the frequency).  If this is what you are looking to do then I will help, or should I be doing things differently? All of the functions I have found to filter or extract tones seem to introduce a larger frequency of phase error than i get using this method, but am I missing something?
    "looping" is a bit vague. What is the actual algorithm to find better estimates (e.g. levenberg marquardt, etc.)
    What problems did you have with extract single tone. Can you show some data where the results from it are not good?
    LabVIEW Champion . Do more with less code and in less time .

  • Best fit Line on scatter chart

    Hi,
    I am trying to draw best fit line over two points using the formula y=mx+c.
    I have the following data,
    consider x=68, y=23 and a=82, b=30
    I interchanged the above values and form the points to plot
    basically using the above (x,y,a and b) I constructed (x,y),(a,y),(x,b) as points to plot.
    68,23 (x,y)
    82,23 (a,y)
    68,30 (x,b)
    I created a scatter chart based on the value, Now I want to draw the line only between (a,y) and (x,b).
    Is this achievable using any other chart or ways?
    Any help highly appreciated.
    Thanks,
    Vino

    Hi,
    Any input on this please.
    Thanks,
    Vino

  • Is it possible to do best fit line in chart in numbers

    is it possible to do best fit line in chart in numbers

    Hi R,
    This is a Scatter Plot in Numbers 3.1. Data are in Body Columns, not Header Columns.
    Click on the chart, then Format Panel > Series > Trendlines
    Choose a Trendline. You may click on Show Equation and Show R2 (R squared).
    Regards,
    Ian.

  • How to Make a Line of Best Fit/Best Fit Line/Trendline in iWork Numbers '09

    I'm not sure if this is well-known or has been answered elsewhere already, but multiple Google searches have not shown this solution on how to create a line of best fit in Numbers '09 (there is another method that involves drawing a line yourself, but this is much easier and more accurate).
    I stumbled across this trying the above self-draw technique and got so excited I wanted to post the technique. So here is what you do:
    1) Type out your X and Y data
    2) Select the data and select Charts, then select the Scatter Plot
    3) Open up Inspector and select the Chart tab
    4) Select the "Series" tab below the picture of the Scatter Plot and the "Chart Colors..." button
    5) At the bottom of the Inspector window, open the "Advanced" arrow
    6) Select the "Trendline" tab and select the "Linear" trendline from the drop-down bar
    That's it! You can even select the options to show the line equation or the R-squared value!
    Here is a picture of the selected options and what your graph should look like (check that nice R-squared value!).
    http://i.imgur.com/AvfPv.png
    I hope this helps and hope it moves up to the top of the Google search page for this feature.

    Hi Asclepius37,
    Why not just search "trend" or "trendline" in the Numbers '09 User Guide?
    That would take you to page 149 of the guide and the article "Showing Trendlines in Charts," which lists a set of instructions very similar to those in your post.
    The Numbers '09 User Guide and the iWork Formulas and Functions User Guide are searchable pdf files, and may both be downloaded through kinks in the Help menu in Numbers. Both are excellent resources to have on hand.
    Regards,
    Barry
    PS: Searching "best fit" will return zero results, but "best" or "best-fit" will get you to the same article.
    B

  • How can I make the best of my ipod touch screen with no internet connection??

    I've been offered an ipod touch screen last Christmas and it's only a week ago that I took it out of its box. I still can't figure out how to transfer my music library from my laptop to the ipod. But I've installed some apps thinking I would be able to listen to my favourite radio station and play some games wherever I go and to my disappointment nothing's working if not connected to an internet connection. I thought an ipod was an improved walkman and actually it is nothing but a device that should be connected to the internet to work.
    Considering that I don't have a free internet connection to the internet on my mobile phone, I was just wondering wht's the purpose to have an ipod? I really consider to go back to my old walkman... Thank you for your comments to help me to make the best of my Christmas present.

    The message you are getting is saying that the iPod was previous synced to another computer. You can only sync with one computer. If you sync to another computer then the iPod media from the iPod get erased (as the message says) and is replaced with what is in the iTunes library of the second computer.
    Syncing means copying (syncing) media from your iTunes library to your computer)
    iTunes: Syncing media content to iOS devices and iPod       
    For not showing in iTunes:
    - Try entering the screen lock passcode on your iPod if not done already
    - Go to Windows Device Manager and see if there is any problems/unknown devices
    - Can you not import photos from a digital camera? The iPod appears in My Computer like a camera does.

  • How can I make a photo fit my iPhone 6 as wallpaper?

    I have an iPhone 6, and would like to set a photo as wallpaper, but no matter how I crop and try to resize it, it does not fit and an edge is cut off. 
    Any tips on how to make a photo fit?  I did not have this problem with my previous iPhone 4s.

    The easiest way is to select the photo you want to use.  Then edit it (crop, enlarge, move left/right/up/down) then when you are happy with it - take a screen shot (tap sleep/wake button at same time tapping Home button).  Use this saved image as your wallpaper.

Maybe you are looking for

  • Auto Inserting tags in Design View

    Hi, I keep running into a problem that is bugging the crap out of me and I was hoping the Dreamweaver community could help me solve it. Whenever I am in Design View, and I add, say a table, then type some text inside any of the cells, there is a open

  • Green screen pictures

    Can you use the green screen feature on pictures?

  • What's the deal with the HBO promo?

    So, scouring the internet it appears that some people are getting some secret HBO promotion. So, as someone who has had FIOS for 4+ years, I'd like to know how were these people chosen for this promo? Apparently certain markets are getting HBO for fr

  • Custom Event generation

    My question is in relation to generating events. Is there any means in Java to write your own custom Events. What I am looking for is to be able to produce an event and have the actionPerformed method react to it. If this is not possible, then writti

  • Simple Flex Chart question - Plot Chart labels

    I'm playing around with displaying data from WDA as charts in Flex 3. I'm able to bind my internal table, which has 3 fields, to the plot chart. The table looks like this ext_id      type string    " bound to prjname in Flex cost         type string