Jump to content

Search the Community

Showing results for tags 'gaussian function'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • OSBot
    • News & Announcements
    • Community Discussion
    • Bot Manager
    • Support Section
    • Mirror Client VIP
    • Script Factory
  • Scripts
    • Official OSBot Scripts
    • Script Factory
    • Unofficial Scripts & Applications
    • Script Requests
  • Market
    • OSBot Official Voucher Shop
    • Currency
    • Accounts
    • Services
    • Other & Membership Codes
    • Disputes
  • Graphics
    • Graphics
  • Archive

Product Groups

  • Premium Scripts
    • Combat & Slayer
    • Money Making
    • Minigames
    • Others
    • Plugins
    • Agility
    • Mining & Smithing
    • Woodcutting & Firemaking
    • Fishing & Cooking
    • Fletching & Crafting
    • Farming & Herblore
    • Magic & Prayer
    • Hunter
    • Thieving
    • Construction
    • Runecrafting
  • Donations
  • OSBot Membership
  • Backup

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


MSN


Website URL


ICQ


Yahoo


Skype


Location:


Interests

Found 1 result

  1. I've been working to learn about the Gaussian Function, Probability Density Functions, and Cumulative Distribution Functions. https://en.wikipedia.org/wiki/Gaussian_function https://en.wikipedia.org/wiki/Probability_density_function https://en.wikipedia.org/wiki/Cumulative_distribution_function From my understanding you have the Gaussian function: and the integral of the Gaussian function is only equal to 1 when a = 1/(c * sqrt(2pi)) In this case, it can be used as a probability density function with normally distributed values. (This form is used for statistical analysis) b = mu (mean) c^2 = sigma^2 (standard deviation squared or the variance) The above is the relation of the variables of the regular Gaussian function to that of the Normal Distribution (as it's used in statistics). I've never taken a statistics class, so forgive me if I'm wrong on something. Most of the information here is from the wiki page or other resources I was reading to learn from. My goal is to write a function which utilizes the normalized Gaussian function to make a method that returns a random Gaussian number. By doing so it would return numbers closer to the mean more often than those that are farther away. What I tried to do was write a function for the standard Gaussian function, another function for the normalized Gaussian function and then a function that returns a random Gaussian number: /** * * @param a - Absolute maximum * @param b - Mean or center point * @param c - Standard deviation or width * @param x - x-value along the gaussian function * @return corresponding y-value along the gaussian function */ public static double gaussian(double a, double b, double c, double x) { return a * Math.exp( -Math.pow(x-b, 2) / (2 * Math.pow(c, 2)) ); } /** * * @param mu - Mean or center point * @param sigma - Standard deviation or width * @param x - x-value along the gaussian function * @return corresponding y-value along the gaussian function */ public static double gaussianNormalized(double mu, double sigma, double x) { return gaussian( 1 / (sigma * Math.sqrt(2 * Math.PI)), mu, sigma, x); } My issue is that the numbers it provides will always be distributed in an equal fashion to that of the Java Random class which is not what I'm looking for. How can I go about returning numbers that conform to a normalized Gaussian function distribution? am I going about this in the wrong way?
×
×
  • Create New...