Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9215901
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T02:18:18+00:00 2026-06-18T02:18:18+00:00

I’m making some modifications to the load testing framework that we’re using throughout the

  • 0

I’m making some modifications to the load testing framework that we’re using throughout the company, and this is a question for which I would love to have an answer.

I was under the impression that the following 2 approaches to generating a Poisson distribution would be equivalent, but I’m clearly wrong:

#!/usr/bin/env python                                                                            

from numpy import average, random, std
from random import expovariate

def main():

    for count in 5.0, 50.0:
        data = [random.poisson(count) for i in range(10000)]
        print 'npy_poisson average with count=%d: ' % count, average(data)
        print 'npy_poisson std_dev with count=%d: ' % count, std(data)

        rate = 1 / count
        data = [expovariate(rate) for i in range(10000)]
        print 'expovariate average with count=%d: ' % count, average(data)
        print 'expovariate std_dev with count=%d: ' % count, std(data)

if __name__ == '__main__':
    main()

This results in output that looks like:

npy_poisson average with count=5:   5.0168
npy_poisson std_dev with count=5:   2.23685443424
expovariate average with count=5:   4.94383067075
expovariate std_dev with count=5:   4.95058985422
npy_poisson average with count=50:  49.9584
npy_poisson std_dev with count=50:  7.07829565927
expovariate average with count=50:  50.9617389096
expovariate std_dev with count=50:  51.6823970228

Why does the standard deviation when I use the built in random.expovariate scale proportionately with number of events in a given interval, while the expovariate std_deviation scales at a rate of log base 10 (count)??

Follow up question: Which one is more appropriate if you’re simulating the frequency with which users interact with your service?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T02:18:20+00:00Added an answer on June 18, 2026 at 2:18 am

    Because your assumptions are wrong. The mean / variance of a Poisson distribution are both lambda, hence the stdev is sqrt(lambda). The mean / variance of an exponential distribution are 1/lambda and 1/lambda^2 respectively. So std = sqrt(1/(1/rate)^2) = sqrt(rate^2) = rate which is exactly what you are seeing here.

    I’d suggest reading the Wikipedia article on queuing theory for your follow up question.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
That's pretty much it. I'm using Nokogiri to scrape a web page what has
For some reason, after submitting a string like this Jack’s Spindle from a text
I would like to run a str_replace or preg_replace which looks for certain words
This could be a duplicate question, but I have no idea what search terms
I know there's a lot of other questions out there that deal with this
I'm making a simple page using Google Maps API 3. My first. One marker
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.