Results 1 to 3 of 3

Math Help - Need Help Calculating A Percentage For a Script

  1. #1
    Newbie
    Joined
    May 2012
    From
    United States
    Posts
    1

    Need Help Calculating A Percentage For a Script

    Hi all, new here so take it easy on me.

    I'm designing a script designed to trigger a random drill within a 30 day time frame. I don't yet know how many times the check will occur, so for now we'll say that it will run X times within the 30 day period and it should only activate the drill once within the 30 day timeframe. If it doesn't occur within the 30 day timeframe then it will trigger at the end of the 30 days.

    Each time the script runs it will evaluate some conditions, then decide whether or not to activate by generating a random number between 0 and 32767. A percentage of these numbers is allocated to "yes, activate" and the larger percentage is allocated to "No, don't activate." I need to figure out the percentage that will provide an even 'chance-to-trigger' out of the X times it is run within the 30 day period.

    The only thing I'm coming up with is 1/X, but that seems far too simple.
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Newbie
    Joined
    Jun 2012
    From
    georgia
    Posts
    12
    Thanks
    1

    Re: Need Help Calculating A Percentage For a Script

    If by "run" you mean generate the random number and have a chance to "activate the drill", then I would say yes 1/X is the correct solution regardless of its appeared simplicity.

    If it "runs" 15 times in a 30 day period you need one of these 15 to activate the drill. (1/15) However it seems like the probability it will be activating the drill at the end of the thirty days will be higher and thus doing away with the "randomness" on most occasions.
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Newbie
    Joined
    Jun 2012
    From
    georgia
    Posts
    12
    Thanks
    1

    Re: Need Help Calculating A Percentage For a Script

    Could it randomly run the check and activate the drill on the second of one month and 23rd of the next month? Since it's designed to "trigger a random drill within a 30 day time frame", and that would put either 51 or 52 days between the two checks?
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Calculating percentage of exponents.
    Posted in the Algebra Forum
    Replies: 3
    Last Post: April 1st 2010, 06:33 PM
  2. Calculating percentage capacity used...help!!!
    Posted in the Geometry Forum
    Replies: 2
    Last Post: January 24th 2010, 06:06 PM
  3. Calculating percentage capacity used...help!!!
    Posted in the Calculus Forum
    Replies: 0
    Last Post: January 24th 2010, 05:26 PM
  4. Calculating percentage change
    Posted in the Business Math Forum
    Replies: 1
    Last Post: January 19th 2010, 09:34 AM
  5. Need help calculating unknown percentage
    Posted in the Algebra Forum
    Replies: 4
    Last Post: April 15th 2009, 06:28 AM

Search Tags


/mathhelpforum @mathhelpforum