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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T17:04:12+00:00 2026-06-15T17:04:12+00:00

I am working on an ICA implementation wich is based on the assumption, that

  • 0

I am working on an ICA implementation wich is based on the assumption, that all source signals are independent. So I checked on the basic concepts of Dependence vs. Correlation and tried to show this example on sample data

from numpy import *
from numpy.random import *
k =  1000
s = 10000
mn = 0
mnPow = 0
for i in arange(1,k):
    a = randn(s)
    a = a-mean(a)
    mn = mn + mean(a)
    mnPow = mnPow + mean(a**3)
print "Mean X: ", mn/k
print "Mean X^3: ", mnPow/k

But I couldn’t produce the last step of this example E(X^3) = 0:

>> Mean X:  -1.11174580826e-18
>> Mean X^3:  -0.00125229267144

First value I would consider to be zero, but second value is too large, isn’t it? Since I subtract the mean of a, I expected the mean of a^3 to be zero as well. Does the problem lie in

  1. the random number generator,
  2. the precision of the numerical values
  3. in my misunderstanding of the concepts of mean and expected value?
  • 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-15T17:04:13+00:00Added an answer on June 15, 2026 at 5:04 pm

    The sample mean itself is a random variable. While its expected value here is zero, the particular realizations will fluctuate around that expected value.

    When I run the following many times:

    from numpy import *
    from numpy.random import *
    k =  1000
    s = 10000
    mn = 0
    mnPow = 0
    for i in arange(k):
        a = randn(s)
        mn += mean(a)
        mnPow += mean(a**3)
    print "Mean X: ", mn/k
    print "Mean X^3: ", mnPow/k
    

    I get numbers for both means that fluctuate around zero.

    EDIT:

    If you plot the density of this, the means look gaussian itself:
    enter image description here

    Note that I’ve removed a = a-mean(a) from your code since it’s erroneous. With it, mn accumulates mean(a - mean(a)) which is mathematically zero due to linearity of expectation:

    E[x - E[x]] = E[x] - E[E[x]] = E[x] - E[x] = 0
    

    The only reason it comes out as slightly non-zero is due to rounding errors.

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

Sidebar

Related Questions

Working in D3.js, I'd like to select all the elements that match a selector
Working with an undisclosed API, I found a function that can set the number
Working with a Lucene index, I have a standard document format that looks something
Working with a SqlCommand in C# I've created a query that contains a IN
Working on a project that parses a log of events, and then updates a
I'm currently working on an a program idea I've had that involves desktop remoting.
working on xcode I realized that if I create a non-void method, I call
Working on getting the Mercurial Source Control installed and working with Lotus Domino Designer
Working on an extension that use the new experimental devtools apis. How do you
Working with the Box2djs plugin here: http://www.crackin.com/dev/mms/physics/ ... and all I'm trying to do

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.