Results 1 to 4 of 4
  1. #1
    nirath is offline Member
    Join Date
    Dec 2013
    Location
    Japan
    Posts
    2
    Rep Power
    0

    Post How to calculate Variance from a given file

    I want to calculate Mean and Variance from a given file "file.txt", and then write the results into another text file "output.txt".

    I just know that I have to import java.io.*, but I don't know what should I do more.
    Please help me.
    Thanks

    Here is the file that I want to read for calculating Mean & Variance:
    Attached Files Attached Files
    Last edited by JosAH; 12-12-2013 at 07:53 PM.

  2. #2
    SurfMan's Avatar
    SurfMan is offline Godlike
    Join Date
    Nov 2012
    Location
    The Netherlands
    Posts
    990
    Rep Power
    2

    Default Re: How to calculate Variance from a given file

    I am pretty sure that your professor wouldn't give you this on day 1, when you haven't even written a single line of Java yet. So there *must* be something you can write to make a start. Please make an effort from your part and show what you got, describe the problem you have, where you are stuck and any error message or stacktrace. Once you do that, the forum will also make an effort and help you understand the problem. You must keep in mind that this is not CodeFactory.com, HomeworkGenerator.com or Rent-a-Coder.com.
    "It's not fixed until you stop calling the problem weird and you understand what was wrong." - gimbal2 2013

  3. #3
    jim829 is offline Senior Member
    Join Date
    Jan 2013
    Location
    Northern Virginia, United States
    Posts
    3,786
    Rep Power
    5

    Default Re: How to calculate Variance from a given file

    Next time, please just type the seven numbers in the post. In general this forum frowns on attachments.
    Also, the web is ripe with algorithms on calculating variance, standard deviation, etc.

    Regards,
    Jim
    The JavaTM Tutorials | SSCCE | Java Naming Conventions
    Poor planning on your part does not constitute an emergency on my part

  4. #4
    JosAH's Avatar
    JosAH is online now Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,663
    Blog Entries
    7
    Rep Power
    21

    Default Re: How to calculate Variance from a given file

    @OP: I moved back the original content of your post so that other readers know what this thread is all about.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

Similar Threads

  1. Replies: 1
    Last Post: 01-31-2013, 09:25 PM
  2. How to calculate the sample rate of an audio file?
    By arnab321 in forum CLDC and MIDP
    Replies: 0
    Last Post: 12-28-2008, 01:39 PM
  3. Replies: 40
    Last Post: 07-04-2008, 09:41 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •