Results 1 to 11 of 11

Thread: Estimated Population, i'm not getting somthing...

  1. #1

    Thread Starter
    Hyperactive Member voidflux's Avatar
    Join Date
    Jun 2003
    Location
    Brockway, PA
    Posts
    290

    Question Estimated Population, i'm not getting somthing...

    Hello everyone, i'm having troubles figuring this out. The directions say in this book:
    If P is the populaiton on the firsty day of the year
    B- Birth rate
    D- Death Rate
    the estimated population at the end of the year is given by the formula:
    P + (B*P)/(100) - (D*P)/(100)
    that would just be:
    P + [(B*P)-(D*P)]/100 right?

    The population growth rate is given by the formula:
    B-D;

    well it says I need 2 functions, growthRate and estimatedPopulation.
    The growthRate will calculation the well, growthRate by subtracting B-D;
    this will return the growthRate;

    and the second function
    estimatedPopulation will calculate the estimated population after n years.
    It will find the estimated Population from, the growthRate and the currentpopulation and then finaly the number of years that have passed. This confuses me because the function will only take 3 parameters, meaning it can't have the deathRate or the Birthrate. So does anyone know the formula to find the population after n years by just using the GrowthRate, Current Population, and number of years?

    I remeber using a population growth formula in calc, it was somting like this:
    n(t) = n*e^(rt);
    n = orginal pop
    r = rate
    t = amount of time
    this way would work i think, but it wouldn't be fallowing the books directions.
    C¤ry Sanchez
    Computer Science/Engineering
    @ Penn State
    IBM.zSeries Intern
    Mandriva 2007

  2. #2
    Fanatic Member bugzpodder's Avatar
    Join Date
    Jun 2002
    Location
    Ontario, Canada
    Posts
    787
    based on what you told me,
    birth rate - death rate can be replaced by growth rate. hence you ownly need growth rate, number of years, and population. i dont know, but i would attempt something recursive.
    Massey RuleZ! ^-^__Cheers!__^-^ Massey RuleZ!


    Did you know that...
    The probability that a random rational number has an even denominator is 1/3 (Salamin and Gosper 1972)? This result is independently verified by me (2002)!

  3. #3

    Thread Starter
    Hyperactive Member voidflux's Avatar
    Join Date
    Jun 2003
    Location
    Brockway, PA
    Posts
    290
    Thanks for the responce, there has to be an easier way rather then using recursion becuase this is only chapter 6, and recursion isn't covered until chapter 11 or 12. I'll keep working at it though, thanks.
    C¤ry Sanchez
    Computer Science/Engineering
    @ Penn State
    IBM.zSeries Intern
    Mandriva 2007

  4. #4
    Addicted Member
    Join Date
    Apr 2003
    Posts
    170

    an easy task :)

    this is so easy to do:
    first you hav function 1:

    growthR = birthR - deathR

    and function 2:

    NewPopulation = CurrentPopulation * ( 1 + growthR/100 ) ^ YEARS


    do u want the logic ??
    well, here it is
    year1 = Now + growthR*Now/100
    = Now * ( 1 + growthR/100)

    now
    year2 = year1 * (1+ growthR/100)
    = Now * (1 + growthR/100)^2

    so
    yearN = Now * (1 + growthR/100)^N


    good luck
    Last edited by ZaidGS; Aug 23rd, 2003 at 02:43 PM.

  5. #5

    Thread Starter
    Hyperactive Member voidflux's Avatar
    Join Date
    Jun 2003
    Location
    Brockway, PA
    Posts
    290

    Thumbs up

    hey sorry for my delayed responce, but i have been very busy! I'm testing now to see if its working alright! thanks for the reply!
    C¤ry Sanchez
    Computer Science/Engineering
    @ Penn State
    IBM.zSeries Intern
    Mandriva 2007

  6. #6

    Thread Starter
    Hyperactive Member voidflux's Avatar
    Join Date
    Jun 2003
    Location
    Brockway, PA
    Posts
    290

    Question

    is this correct?
    here's my output of my program:
    Code:
    Enter the starting population: 2000
    Enter the birth Rate: 40
    Enter the death Rate: 5
    Enter the number of years that has past: 20
    The growth Rate is: 35
    The estimated Population is: 808547
    Press any key to continue
    I did it on my TI-83 and I got the same answer.
    But why does this popluation growth formula get a different result from this one?
    If i use this formula:

    Code:
    n(t) = n*e^(rt);
    n = orginal pop
    r = rate
    t = amount of time
    
    n(t) = 2000*e^(.35*20);
    n(t) = 2193266
    which would be the estimated population
    So one formula gets:
    808547
    and the other gets
    2193266
    Whats wrong here?
    Incase you know C++ here's the function that returns the estimated population growth:
    Code:
    double estimatedPopulation(double currPopulation, double growthRate, int numOfyears)
    {
    	return(currPopulation *pow((1+growthRate/100),numOfyears));
    }
    Thanks!
    C¤ry Sanchez
    Computer Science/Engineering
    @ Penn State
    IBM.zSeries Intern
    Mandriva 2007

  7. #7
    Addicted Member
    Join Date
    Apr 2003
    Posts
    170
    who said that
    n(t) = n*e^(rt)
    is right ??!
    its 100% wrong i guess !!!

    if you concluded it yourself, write the steps to prove it,
    maybe i'll tell ya whats wrong !!!!

  8. #8

    Thread Starter
    Hyperactive Member voidflux's Avatar
    Join Date
    Jun 2003
    Location
    Brockway, PA
    Posts
    290
    if you concluded it yourself, write the steps to prove it
    I didn't conclude it myself, I got this formula from looking in my highschool notes from calc class. Here's a problem that was solved using this formula:
    The number of bacteria in a culutre is given by the formula:
    n(t) = 500e^(.45t);
    where t is measured in hours.
    (a) What is the initial number of bactertia?
    (b) What is the relative reate of growth of this bacterium population? Express your answer as a percetnage.
    (c) How many bacteria are in teh culture after 3 hours?
    (d) After how many hours will the number of bacteria reach 10,000?
    here's the solution:
    Code:
    n(t) = ne^(rt);
    n = orginal pop
    r = rate of growth
    t = time
    
    (a) 500
    (b) 45%
    (c) n(t) = 500e^(.45*3)
         n(t) = 1928.7
    (d) 10000 = 500e^(.45*t)
          20 = e^(.45t)
          ln20 = lne^(.45t)
          ln20 = .45t
          6.66 hours = t;
    using the above formula it correctly estimated the population after t hours.
    So it should have produced the right results!
    C¤ry Sanchez
    Computer Science/Engineering
    @ Penn State
    IBM.zSeries Intern
    Mandriva 2007

  9. #9
    Addicted Member
    Join Date
    Apr 2003
    Posts
    170
    well, ok,
    the equation
    PN = P0 * e ( growthR * T ) ,
    is also valid , i forgot the exponential growth thing
    both equations can be considered valid (yet, the calculus one
    is more accurate ) and that u get big differences u'd better use it.
    the equation PN=P0*(1+growthR)^T assumes that the
    rate of growth is constant through the year, and on
    the next year the rate changes according to the new population.
    while calculus changes the growth rate (not every year) but at every
    birth or death (ie. birth rate is updated more frequently so more
    accurately)
    when growth rate is fast and over large time, differences become
    more obvious, ie. for 3% grwoth rate and over 5 years, the answers
    will be very close, but for a high rate as 35% and over 20 years,
    calculus is very much more dependable
    IE: 2193266 is the right answer.
    that equation is proven starting with:
    dP/dT = kP ==> dP / P = kdT .....etc..

  10. #10
    Addicted Member
    Join Date
    Apr 2003
    Posts
    170
    by the way:
    the formula you ORIGINALLY gave
    -------------------------------------
    P + (B*P)/(100) - (D*P)/(100)
    -------------------------------------

    assumes rate of changes is changed every year, not at every
    birth, so calculus on that equation is not valid,
    but generally, calculus is better used

  11. #11

    Thread Starter
    Hyperactive Member voidflux's Avatar
    Join Date
    Jun 2003
    Location
    Brockway, PA
    Posts
    290

    Thumbs up

    Thanks alot, good explanation!
    C¤ry Sanchez
    Computer Science/Engineering
    @ Penn State
    IBM.zSeries Intern
    Mandriva 2007

Posting Permissions

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



Click Here to Expand Forum to Full Width