public class StatCalc {
private int count; // Number of numbers that have been entered.
private double sum; // The sum of all the items that have been entered.
private double squareSum; // The sum of the squares of all the items.
/**
* Add a number to the dataset. The statistics will be computed for all
* the numbers that have been added to the dataset using this method.
*/
public void enter(double num) {
count++;
sum += num;
squareSum += num*num;
}
/**
* Return the number of items that have been entered into the dataset.
*/
public int getCount() {
return count;
}
/**
* Return the sum of all the numbers that have been entered.
*/
public double getSum() {
return sum;
}
/**
* Return the average of all the
…show more content…
Methods are provided to return the following statistics for the set of numbers that have been entered: The number of items, the sum of the items, the average, the standard deviation, the maximum, and the minimum.
*/
public class StatCalc {
private int count; // Number of numbers that have been entered. private double sum; // The sum of all the items that have been entered. private double squareSum; // The sum of the squares of all the items. private double max = Double.NEGATIVE_INFINITY; // Largest item seen. private double min = Double.POSITIVE_INFINITY; // Smallest item seen.
public void enter(double num) {
// Add the number to the dataset. count++; sum += num; squareSum += num*num; if (num > max) max = num; if (num < min) min = num;
}
public int getCount() {
// Return number of items that have been entered. return count;
}
public double getSum() {
// Return the sum of all the items that have been entered. return sum;
}
public double getMean() {
// Return average of all the items that have been entered.
// Value is Double.NaN if count == 0. return sum / count;
}
public double getStandardDeviation() {
// Return standard deviation of all the items that have been entered.
// Value will be Double.NaN if count == 0. double mean = getMean(); return Math.sqrt( squareSum/count - mean*mean );
}
public double getMin() {
// Return the smallest item that has been entered.
// Value will be infinity if no items have
Theoretically from the recorded data the calculated mean, median, and mode will be the most accurate representation of the real world value. The difference between the highest recorded value and lowest recorded value is the range in the set of data. Standard deviation (s) is a quantity calculated to indicate an extend of deviation for a group of data as a whole (Marshall). This is calculated using:
Mean is the average of a group of scores (Woolfolk, 2014). Mean and average are used interchangeably. To find the mean, a teacher will add all of the scores together and divided by the number of tests. For example, a teacher wants to find the mean of the spelling test, the spelling test scores are as the following, 10, 8, 7, 8, 10, 10, 6, 5, 7, and 5. The first step is to add all of the scores together (76). The second step is to divided by the number of tests (10), the quotient is the mean (7.6). The first math equation is 10+8+7+8+10+10+6+5+7+5=76. The second math equation is 76/10=7.6. The mean of the
b) In order to calculate the mean or average for the governors and CEO’s, I added together all the figures and divided that sum by 4 since there
System.out.println(); System.out.println("Total Sales \t Total Compensation"); System.out.println("----------- \t ------------------"); double minimumSales = 80000; double potentialCommission = minimumSales * 0.05; double potentialCommission1 = 85000 * 0.05; double potentialCommission2 = 90000 * 0.05; double potentialCommission3 = 95000 * 0.05; double potentialCommission4 = 100000 * 0.0625; double potentialCommission5 = 105000 * 0.0625; double potentialCommission6 = 110000 * 0.0625; double potentialCommission7 = 115000 * 0.0625; double potentialCommission8 = 120000 * 0.0625; double potentialCompensation = salary + potentialCommission; double potentialCompensation1 = salary + potentialCommission1; double potentialCompensation2 = salary + potentialCommission2; double potentialCompensation3 = salary + potentialCommission3; double potentialCompensation4 = salary + potentialCommission4; double potentialCompensation5 = salary + potentialCommission5; double potentialCompensation6 = salary + potentialCommission6; double potentialCompensation7 = salary + potentialCommission7; double potentialCompensation8 = salary + potentialCommission8;
Class data will be collected and averaged. Make a graph of your data on the graph paper provided below. (4
Ashton Vincent’s roll total was 1132. The average 11.32. The sample variance and sample standard deviation were 93.05% and 96.46% respectively. The sample z-score was 314.85%. My results from the experiment were roll totals of 1124, roll average of 11.24, sample variance of 94.21%, sample standard deviation of 97.06%, and sample z-score of 282.38%.
The summary statistics for Southwest Airlines is as follows: the mean is 90 minutes, the standard deviation is 57 minutes, the standard error is 1 minute, the median is 73 minutes, the Q1 is 45 minutes, the Q3 is 115 minutes, and the interquartile range is 70 minutes.
Using the StatCalc class, write a program that calculates and then displays as output to the console, the following statistics against the set of numbers given below.
The report then goes on to describe what statistical education should look like. The framework presented in the report is based off the National Council of Teachers of Mathematics (NCTM) and its Principles and Standards for School Mathematics published in 2000. The framework breaks down statistical education into four main components:
For the data i had only 2 numbers (6667 and 5455) that i had to find for the mean, median, mode and range, Julian had 3 numbers (5000, 6667, and 7500) to find and Ryan had 3 numbers (10000, 8571, and 18571) also. My mean was 5818.6, Julian’s was 6750.2, and Ryan’s was 9485.5. My mode is 5455, Julian’s is 6667, and Ryan’s is 8571. My median is 5454, Julian’s is 6667, and Ryan’s is 9285.5. Last but not least the range of my data is 1212, Julian’s is 2500, and Ryan’s is
Students in a science class have just received their grades on the first test. The instructor has provided information about the first test grades in some previous classes as well as the final average for the same students. Some of these grades have been sampled and are as follows:
Here is a description of the most common software for statistics calculations and links to tutorials on how to use this software.
Input width Display “Enter rectangle length:” Input length Calculate_Area (input_width, input_length) Display "The area of the rectangle is " rectangle_area 3. number1 = random(1000); number2 = random(1000); sum = number1+number2 print "enter the answer for adding numbers", number1," and", number2 input answer if answer = sum ) print "congratulations" else print "The correct answer is ", sum 7. calcscore( score1,score2,score3,score4,score5) declare total,average set total =score1+score2+score3+score4+score5 set average=
|Mean |51.84444 | |3 |0 1 3 3 4 5 5 7 8 8 8 8 9 |
Median = (107/2) = 53.5th, so we know that the median should be in the class 1001-1500