Question about Computers & Internet

1 Answer

I am java beginner and I want a help in writing a java program to calculate the variance for an array of numbers

Posted by on

1 Answer

  • Level 2:

    An expert who has achieved level 2 by getting 100 points

    All-Star:

    An expert that got 10 achievements.

    MVP:

    An expert that got 5 achievements.

    Vice President:

    An expert whose answer got voted for 100 times.

  • Expert
  • 249 Answers

The best thing to do here is to separate the steps for calculating the variance into different functions. To compute the variance the first thing to do is to compute the mean or the average of the numbers in the array. so your first function will loop through each of the numbers and divide it by the length of your array. the output is the returned. The next thing to do is create another function for the variance. loop through each of the numbers again and subtract to each number the mean. square the value then add to the previous. so that means you have another variable that starts from zero and just adds the answer. after that divide it by the length of the array again and what you are going to get is the value for the variance.

Posted on May 26, 2009

1 Suggested Answer

6ya6ya
  • 2 Answers

SOURCE: I have freestanding Series 8 dishwasher. Lately during the filling cycle water hammer is occurring. How can this be resolved

Hi,
a 6ya expert can help you resolve that issue over the phone in a minute or two.
best thing about this new service is that you are never placed on hold and get to talk to real repairmen in the US.
the service is completely free and covers almost anything you can think of (from cars to computers, handyman, and even drones).
click here to download the app (for users in the US for now) and get all the help you need.
goodluck!

Posted on Jan 02, 2017

Add Your Answer

Uploading: 0%

my-video-file.mp4

Complete. Click "Add" to insert your video. Add

×

Loading...
Loading...

Related Questions:

1 Answer

Write a program c that declares an array of 100 elements to hold these values. Read the values in from the file and store them in successive elements of the array. Keep track of how many numbers are read...


That appears to be an intermediate question in a programming class. Best read the book, the answer is not what is important the process of getting the answer is what you are trying to learn.

May 17, 2017 | Office Equipment & Supplies

1 Answer

"Stack overflow at line 0"


b> A stack is a section of memory where a program stores its variables, calculations, option states and program parameters. When started, a program is allocated some memory to use for the stack; a stack overflow happens when a program exceeds its allocation. The offending program may attempt to write into adjacent memory sections, causing conflicts with other programs. Stack overflows are common with Java, C++, Perl and other runtime environments, which assist in running programs. A stack overflow at line 0 indicates that the offending program tripped up from the start; however, stack overflows can occur on any line number.

Click "Start," "Control Panel, then "Internet Options." Click on the "Advanced" tab. Check "Disable Script Debugging (IE)" and "Disable Script Debugging (Other)" under the "Browsing" options. Uncheck "Display a notification about every script error." Check "Enable Automatic Crash recovery." Click "OK." Download and install a Java update from the Java website. http://www.java.com/en/download/manual.jsp Download and install a Windows update. Hope this helps.

Dec 24, 2012 | Microsoft Windows XP Professional

1 Answer

Sample variance on Sharp EL-738


To calculate this you press ALPHA (the green key) and 5 or 6 depending on if you want sample variance (ALPHA 5) and for population variance (ALPHA 6).

Jul 17, 2012 | Sharp EL-738 Scientific Calculator

2 Answers

I want java for programmng....so can u tell which java version to download and send the link for it?


Hi,

If you want to do standard programming, download the Java SDK (also known as JDK). If you want a free editor in which you can write code, compile it, test it and so forth, download the version with NetBeans. The link is: http://java.sun.com/javase/downloads/index.jsp

Jun 08, 2010 | Sun Java System Web Server 6.1...

1 Answer

Code for method parseInt() in java


parseInt(java.lang.String, int)

This code takes two arguments, a string constructor from the Java language and an integer. Its purpose is to parse (meaning de-construct or disassemble into component parts) one data type into another.

Here is an example of a Java program to specify and print out the dimensions of a rectangle, taken from the page http://www.roseindia.net/java/beginners/entervaluesfromkeyboard.shtml:

class Rectangle{
int length, breadth;
void show(int x, int y){
length = x;
breadth = y;
}
int calculate(){
return(length * breadth);
}
}
public class EnterValuesFromKeyboard{
public static void main(String[] args) {
Rectangle rectangle = new Rectangle();
int a = Integer.parseInt(args[0]);
int b = Integer.parseInt(args[1]);
rectangle.show(a, b);
System.out.println(" you have entered these values : " + a + " and " + b);
int area = rectangle.calculate();
System.out.println(" area of a rectange is : " + area);
}
}

Apr 09, 2009 | Sun Java Programming Language (cdj-275)

2 Answers

I'm interested to learn more java programming but I do not no wer


I advice you to start from this site:
http://math.hws.edu/javanotes/

and watch this video:
http://www.youtube.com/watch?v=KheL6umdW-s

try googl.com and write:
java programming

Nov 21, 2008 | Computers & Internet

2 Answers

C++ program for insertion, deletion in linked list and 2d array pls send the details for linked list so that i can understand it the best..considering me as a beginner.


program for deletion


#include<iostream.h>
void main()
{
int a[10],i,n,x;
cout<<"\n\t\tPROGRAM TO DELETE AN NUMBER FROM AN ARRAY";
cout<<"\nEnter the size of the array:";
cin>>n;
for(i=0;i<n;i++)
{
cout<<"\nEnter the number:";
cin>>a[i];
}
cout<<"\nEnter the position to be deleted:";
cin>>x;
for(i=x;i<n;i++)
a[i]=a[i+1];
for(i=0;i<n-1;i++)
cout<<a[i]<<" ";
}

Oct 13, 2008 | Computers & Internet

2 Answers

Source code for word count


Haha, i wrote one of thee a while ago for a competition. You need to us e the char at function mate :D
Inside a for loop
Ill havea look for you though :D

Sep 09, 2008 | ArcMedia JavaScript Source Code 3000 Pro...

11 Answers

Java programming


I ll give you some reference book names for core java they are the best,

1)Head First Java by Kathy Sierra & Bert Bates

2)SCJP 5.0 by Kathy Sierra & Bert Bates

the first one is the best for the beginners read it before you go for any other

good luck

Aug 14, 2008 | Sun Java Programming Language (cdj-275)

Not finding what you are looking for?
Computers & Internet Logo

Related Topics:

132 people viewed this question

Ask a Question

Usually answered in minutes!

Top Computers & Internet Experts

Doctor PC
Doctor PC

Level 3 Expert

7733 Answers

kakima

Level 3 Expert

102366 Answers

David Payne
David Payne

Level 3 Expert

14161 Answers

Are you a Computer and Internet Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...