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

  • SEARCH
  • Home
  • 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 8431417
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T05:51:01+00:00 2026-06-10T05:51:01+00:00

I am generating a bunch of N normal rvs (mean 0 sd 1) with

  • 0

I am generating a bunch of N normal rvs (mean 0 sd 1) with numpy and then taking the standard deviation of the sample with ddof = 1 which should presumably give me an unbiased estimator. The process is roughly as follows:

def genData(samples = 20, mean = 333.8, sd = 3.38):
    bl = scipy.stats.norm.rvs(loc = mean, scale = sd, size = samples)
    return [np.mean(bl), np.std(bl, ddof = 1)]

means = {}
sds = {}

n = 50000

for size in range(5,21):
    x = [genData(size, mean = 0, sd = 1) for x in range(n)]
    means[size] = map(lambda d: d[0], x)
    sds[size] = map(lambda d: d[1], x)

However, I observe the following KDEs instead:

ddof = 1
KDEs at ddof = 1
ddof = 2
KDEs at ddof = 2
Pardon the rough curves due to small sample size.

There is clear bias with ddof = 1 which is eliminated with ddof = 2. What am I doing wrong here?

  • 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-10T05:51:02+00:00Added an answer on June 10, 2026 at 5:51 am

    The square root of an unbiased estimator of variance is not necessarily an unbiased estimator of the square root of the variance. In mathematical terms, sum[(s-u)²]/(N-1) is an unbiased estimator of the variance V even though sqrt{sum[(x-u)²]/(N-1)} is not an unbiased estimator of sqrt(V).

    This is actually on scipy’s documentation: link (see the “Notes” section).

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

Sidebar

Related Questions

I have a django view generating a bunch of data which I want to
I have a bunch of standard MBeans which I need to convert to dynamic
My form is generating a bunch of warnings - WARNING: Can't mass-assign these protected
I'm very new to Rails and web development. I'm generating a bunch of objects
Generating normal columnar data in excel file is quite easy but does any one
I'm generating a bunch of li items as a result of an ajax call.
I'm generating a large script to do a bunch of inserts and updates. When
I'm generating a bunch of HTML docs with Sphinx. Is there an easy way
Howdy, I'm generating a bunch of Textblocks in a StackPanel. I would love to
Using jQuery I'm programmatically generating a bunch of div 's like this: <div class=mydivclass

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.