Trent Introductory Physics Lab Slope and intercept uncertainty Slope and intercept uncertainty in Excel, OpenOffice Calc and Apple Numbers Microsoft Excel and OpenOffice Calc have a built in formula called Line Statistics which calculates slope, intercept, uncertainty in the slope and uncertainty in the intercept. Enter the X axis data in one column and the corresponding Y axis data in an adjacent column Here, 9 pairs of (X,Y) data points are entered in columns A and B. We will be using the LINEST formula which is an array output formula. That is, the results span several cells. Move to an empty cell and enter the LINEST formula =LINEST(known Y value cells, known X value cells, 1, true) For this example the known Y value cells are B1:B9 and the known X value cells are A1:A9. You can type the ranges in or use the cursor to highlight the cells. The “1” forces the intercept to be calculated normally and the “true” forces full statistics reporting. For this example then the formula entered in cell A11 will be for Excel = LINEST (B1:B9,A1:A9,1,TRUE) for OpenOffice = LINEST (B1:B9;A1:A9;1;TRUE) semicolons instead of commas Now press for Excel <ENTER> for OpenOffice press <CTRL>+<SHIFT>+<ENTER> Line slope and intercept 1 Trent Introductory Physics Lab Slope and intercept uncertainty for Excel only: After entering this formula cell A11 contains only the slope value. In order to see the full statistics, a 2x5 cell area must be selected for the formula output. Select a 2x5 cell area starting with the formula cell by clicking the left mouse button and dragging from cell A11 (the formula cell) to cell B15. Press F2, and then press <CTRL>+<SHIFT>+<ENTER> The values of interest are in the top 4 cells Here the slope is 9.977099 0.464593 and the intercept is 0.782443 2.629275 Reformatted correctly (one significant digit in the uncertainty and rounding the value to match the accuracy of the uncertainty), the slope is 10.0 0.5 and the intercept is 1 3 for Excel: If the cell [=LINEST …] is edited and you want to refresh the calculation, press <CTRL>+<SHIFT>+<ENTER> after editing (i.e. do not just press <ENTER>). for OpenOffice: In order to edit the =LINEST… formula you must select the 2x5 cell area of the formula output. Then, press <CTRL>+<SHIFT>+<ENTER> after editing (i.e. do not just press <ENTER>). Apple Numbers The LINEST function in Numbers from Apple is an array function and each element in the array is accessed with the “INDEX” function. If the X values are in cells A21:A30 and the Y values are in cells B21:B30 then the slope value is accessed with: =INDEX(LINEST(B21:B30, A21:A30, 1, TRUE), 1, 1) Line slope and intercept 2 Trent Introductory Physics Lab Slope and intercept uncertainty Similarly, the error or uncertainty in the slope value (±δslope) is accessed with: =INDEX(LINEST(B21:B30, A21:A30, 1, TRUE), 2, 1) More help can be found at: http:// http://help.apple.com/functions/mac/3.0/#ffa5a58341 Thanks to Joel Fifield for researching this. Line slope and intercept 3
© Copyright 2025 Paperzz