Results 1 to 9 of 9

Math Help - Direction of series of numbers

  1. #1
    Newbie
    Joined
    Aug 2011
    Posts
    4

    Direction of series of numbers

    Hi All,

    Probably a really easy question for you guys but I am NO maths guru

    I have a database with a numbers like "5678.33" in it, this number goes up and down, how can I determines its direction over time (daily)?

    Please make any example easily readable by me e.g.

    T=Time
    N=Number
    T/N = Direction

    Thanks

    Steve
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Senior Member
    Joined
    Oct 2009
    Posts
    295
    Thanks
    9

    Re: Direction of series of numbers

    I guess you're looking for the trend? If so, you can just plot the data in Excel or some other software and get the trend line.

    I'll use Google's adjusted close stock price as an example



    I took the adjusted close from 08/19/2004 to 0/09/2011, plotted it, and then fit a trend line against it.
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Newbie
    Joined
    Aug 2011
    Posts
    4

    Exactally what I'm looking for, but

    HI downthesun01,

    Yes that is what I am looking for but I want to program it in VB, does anyone know the forumla?

    Steve
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Senior Member
    Joined
    Oct 2009
    Posts
    295
    Thanks
    9

    Re: Direction of series of numbers

    Yes, but it's not fun to do.

    \hat{y}_{t}=b_{0}+b_{1}t

    That's the equation for the trend line.

    Calculating b_0 and b_1 is where it gets tricky.

    b_{1}=\frac{SS_{ty}}{SS_{tt}}=\frac{\sum^{n}_{t=1}  ty_{t}-\frac{(\sum^{n}_{t=1}t)(\sum^{n}_{t=1}y_{t})}{24}}  {\sum^{n}_{t=1}t^{2}-\frac{(\sum^{n}_{t=1}t)^{2}}{24}}



    b_{0}=\bar{y}-b_{1}\bar{t}=\frac{\sum^{n}_{t=1}y_{t}}{24}-b_{1}\frac{\sum^{n}_{t=1}t}{24}


    n is the the amount of data you have. So if you have 40 if you have 40 entries, 100 if you have 100 entries, etc.

    t is time with beginning with your first entry, so t=(1,2,3,...,n)

    I hope that all makes sense.
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Newbie
    Joined
    Aug 2011
    Posts
    4

    Re: Direction of series of numbers

    Hi again downthesun01,

    Well I get a few bits of the equation but far from all of it! is there any way you can do an example sum with just three numbers in it? I think this might help me understand

    Thanks

    Steve
    Follow Math Help Forum on Facebook and Google+

  6. #6
    Newbie
    Joined
    Aug 2011
    Posts
    4

    Re: Direction of series of numbers

    Hi all,

    THinking about this problem again there might be a better way of getting what I want, what I really want to know is if the ftse is going up or down (say without a 30min period) I do not actaully need a trendline as such.

    Thanks

    Steve
    Follow Math Help Forum on Facebook and Google+

  7. #7
    Senior Member
    Joined
    Oct 2009
    Posts
    295
    Thanks
    9

    Re: Direction of series of numbers

    Here you go. I did a 5 number example and attached it as a .pdf for you.
    Attached Files Attached Files
    Follow Math Help Forum on Facebook and Google+

  8. #8
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4

    Re: Direction of series of numbers

    Quote Originally Posted by scarr View Post
    Hi all,

    THinking about this problem again there might be a better way of getting what I want, what I really want to know is if the ftse is going up or down (say without a 30min period) I do not actaully need a trendline as such.

    Thanks

    Steve
    Divide your data into two equal parts, discard the central point if you have an odd number of data points.

    Calculate the mean for the two parts. Your data is rising if the mean second half is larger than that of the first and vice-versa

    CB
    Follow Math Help Forum on Facebook and Google+

  9. #9
    Senior Member
    Joined
    Oct 2009
    Posts
    295
    Thanks
    9

    Re: Direction of series of numbers

    You could just calculate b1. If b1>0 then your data is increasing. B1<0 and the data is decreasing
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. numbers in series
    Posted in the Math Topics Forum
    Replies: 1
    Last Post: January 17th 2013, 03:49 PM
  2. Direction numbers question
    Posted in the Calculus Forum
    Replies: 3
    Last Post: November 21st 2011, 11:01 AM
  3. Replies: 1
    Last Post: August 29th 2011, 02:18 AM
  4. numbers in series
    Posted in the Math Topics Forum
    Replies: 1
    Last Post: October 26th 2005, 05:01 PM
  5. numbers in series
    Posted in the Number Theory Forum
    Replies: 1
    Last Post: October 26th 2005, 08:19 AM

Search Tags


/mathhelpforum @mathhelpforum