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 8090423
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T19:42:57+00:00 2026-06-05T19:42:57+00:00

I am using matlab’s randn function to generate random random numbers from a standard

  • 0

I am using matlab’s randn function to generate random random numbers from a standard normal distribution. I could see this example in the help

r = 1 + 2.*randn(100,1);

It says that it draws numbers from the normal distribution with mean 1 and standard deviation 2. However, when I calculate the mean of r. It is around 0.77. So I am a bit confused. Can anyone please explain?

  • 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-05T19:42:59+00:00Added an answer on June 5, 2026 at 7:42 pm

    The arithmetic mean (sample mean) will converge to the actual mean of the distribution as the number of samples approaches infinity. However, for any finite number of samples, you’re not guaranteed to get the actual mean of the distribution (i.e., 1.0.)

    Try

       r = 1 + 2.*randn(100,1);  mean(r)
       r = 1 + 2.*randn(1000,1);  mean(r)
       r = 1 + 2.*randn(10000,1);  mean(r)
       r = 1 + 2.*randn(100000,1);  mean(r)
    

    etc. and see what happens.

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

Sidebar

Related Questions

I am using Matlab and am using its solve function. I run this code
While using MATLAB 2D filter funcion filter2(B,X) and convolution function conv(X,B,'') , I see
I want to create images like this from a double precision matrix using MATLAB.
I am trying to randomly access a file from a folder using matlab. Could
Using MATLAB, I have this code: value = input('>> Enter a value: '); and
I am trying to draw 256 small sized squares using MATLAB rectangle function. If
Using Matlab, how to generate a net of 3^10 points that are evenly located
I'd like to generate some code using MATLAB Embedded Coder that runs an fft2
For my project I need to generate a sine wave using matlab which has
I'm Using MATLAB R2010a I used this this tutorial in order to call matlab

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.