close

For example:
x y
1 5.5
2 8.5
3 10.5
4 11.5
For x=1.56, what will be the corresponding value of y from drawn graph ?

Check this post in the archives:

www.mcse.ms/archive144-2004-1-346324.html

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
PeltierTech.com/
_______quot;Tusharquot; gt; wrote in message
...
gt; For example:
gt; x y
gt; 1 5.5
gt; 2 8.5
gt; 3 10.5
gt; 4 11.5
gt; For x=1.56, what will be the corresponding value of y from drawn graph ?
You could get an approximate value using interpolation: this imagines a
straight line drawn thru two points that encompass you x value
The slope of the line joining x=1 and x=2 is (8.5-5.5)/(2-1) = 3
So y =3x c
The line goes thru the point (1, 5.5) so 5.5 = 3*1 c hence c = 2.5
For x=1.56; y=3*1.56 2.5 = 7.81

For a better approximation insert a trendline on the chart (use Help and
then return here with questions)
I fitted a second order polynomial (a quadratic) and got y =-0.5x^2 4.5x
1/5 with a R2 value of 1 (a very good fit), I used LINEST (see
www.stfx.ca/people/bliengme/E...Polynomial.htm)
to get these values into cells on the worksheet. When I use x=1.56 my
y-value is 7.3032

best wishes
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

quot;Tusharquot; gt; wrote in message
...
gt; For example:
gt; x y
gt; 1 5.5
gt; 2 8.5
gt; 3 10.5
gt; 4 11.5
gt; For x=1.56, what will be the corresponding value of y from drawn graph ?
If the points are connected linearly with no smoothing, would not f(x) at x =
1.56 be equal to 7.18.

This is based on the interpolation formula:
(where x[1], y[1] are the known values immediately preceding the
interpolation; x[2], y[2] are the known values immediately following the
interpolation; x[i], y[i] are the values at the point of the interpolation)

Starting with the interpolation formula:

y[i] - y[1] x[i] - x[1]
----------- = ------------
y[2] - y [1] y[i] - y[1]

From which we get:

y[i] = (x[i] - x[1])(y[2] - y[1])
----------------------------- y[1]
x[2] - x[1]

Substituting in the values for x = 1.56 we have(1.56 - 1)(8.5 - 5.5)
y[i] = ----------------------- 5.5 = 7.18
2 - 1

quot;Tusharquot; wrote:

gt; For example:
gt; x y
gt; 1 5.5
gt; 2 8.5
gt; 3 10.5
gt; 4 11.5
gt; For x=1.56, what will be the corresponding value of y from drawn graph ?

I think you may have made a typo on your linear interpolation, Berrnard. I
believe that you meant y = 3*1.56 2.5 = 7.18

Steve

quot;Bernard Liengmequot; wrote:

gt; You could get an approximate value using interpolation: this imagines a
gt; straight line drawn thru two points that encompass you x value
gt; The slope of the line joining x=1 and x=2 is (8.5-5.5)/(2-1) = 3
gt; So y =3x c
gt; The line goes thru the point (1, 5.5) so 5.5 = 3*1 c hence c = 2.5
gt; For x=1.56; y=3*1.56 2.5 = 7.81
gt;
gt; For a better approximation insert a trendline on the chart (use Help and
gt; then return here with questions)
gt; I fitted a second order polynomial (a quadratic) and got y =-0.5x^2 4.5x
gt; 1/5 with a R2 value of 1 (a very good fit), I used LINEST (see
gt; www.stfx.ca/people/bliengme/E...Polynomial.htm)
gt; to get these values into cells on the worksheet. When I use x=1.56 my
gt; y-value is 7.3032
gt;
gt; best wishes
gt; --
gt; Bernard V Liengme
gt; www.stfx.ca/people/bliengme
gt; remove caps from email
gt;
gt; quot;Tusharquot; gt; wrote in message
gt; ...
gt; gt; For example:
gt; gt; x y
gt; gt; 1 5.5
gt; gt; 2 8.5
gt; gt; 3 10.5
gt; gt; 4 11.5
gt; gt; For x=1.56, what will be the corresponding value of y from drawn graph ?
gt;
gt;
gt;

Tushar, you specifically asked about how Excel would draw it, which I
addressed in my previous post. If you are more generally interested in in
different methods of interpolation, then there are several reasonable
approached:

linear: 7.18 (as noted by several respondants)

Bezier: 7.248992 (as noted in my previous post)

cubic spline: 7.2568768
groups.google.com/group/micro...2966520eccdb1f

polynomial fit (order gt;=2): 7.3032 =TREND(ydata,xdata^{1,2},1.56^{1,2})
since the posted observations exactly fit 1.5 4.5*x-x^2/2

rational linear: 7.34210526315789 from fitting the monotonic function
y=(a b*x)/(1 c*x)

Jerry

quot;Jerry W. Lewisquot; wrote:

gt; Brian Murphy has shown that the Excel chart smoother appears to use Bezier
gt; curves. You can plug your values directly into his example file
gt; www.xlrotor.com/Smooth_curve_...ample_file.zip
gt; to get 7.248992 as the value interpolated by the chart smoother at 1.56
gt;
gt; Jerry
gt;
gt; quot;Tusharquot; wrote:
gt;
gt; gt; For example:
gt; gt; x y
gt; gt; 1 5.5
gt; gt; 2 8.5
gt; gt; 3 10.5
gt; gt; 4 11.5
gt; gt; For x=1.56, what will be the corresponding value of y from drawn graph ?

Brian Murphy has shown that the Excel chart smoother appears to use Bezier
curves. You can plug your values directly into his example file
www.xlrotor.com/Smooth_curve_...ample_file.zip
to get 7.248992 as the value interpolated by the chart smoother at 1.56

Jerry

quot;Tusharquot; wrote:

gt; For example:
gt; x y
gt; 1 5.5
gt; 2 8.5
gt; 3 10.5
gt; 4 11.5
gt; For x=1.56, what will be the corresponding value of y from drawn graph ?

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 software 的頭像
    software

    software

    software 發表在 痞客邦 留言(0) 人氣()