Question: Java In this question you will be asked to complete basic statistics on a specified array of integer values. A good reference for basic statistics
Java
In this question you will be asked to complete basic statistics on a specified array of integer values. A good reference for basic statistics formulas can be found at: http://integral-table.com/downloads/stats.pdf. a. In the class file H4_Q1, create an int array named numbers initialized with the following values: {2, 6, 9, 3, 12, 4, 14,4}. b. Add code to H4_Q1 that determines the sample mean of numbers and prints it to the screen with an appropriate label. c. Using the algorithm given below, write code in H4_Q1 to sort the array numbers in ascending order. Let n be the size of numbers. Use your code to sort array numbers and print the resulting array with an appropriate label. input: output: 1. 2. 3. 4. 5. 6. 7. a non-sorted list of n numbers, Q1, Q2 ..., An a list with the same numbers, sorted in non-decreasing order for i: n to 1 for j: 1 to i - 1 if aj > aj+1 then { // swap a; with a;+1 taj ajaj+1 aj+1t } Figure 1: Sorting Algorithm d. In H4_Q1, write code to identify the median of the data in numbers Note that your code should work when the dataset contains an even or odd number of records. Write the result to the screen with an appropriate label
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
