Question

In: Computer Science

Given the sample data set s = [1,1,2,2,2,9,-5,-10,8,0] Compute the mean, median, mode, variance and standard...

  1. Given the sample data set

s = [1,1,2,2,2,9,-5,-10,8,0]

  1. Compute the mean, median, mode, variance and standard deviation on paper/ text editor. Show all calculation steps for full credit.
  2. Compute and verify the above statistical quantities using python. You can use the statistics package. Feel free to modify the sample code provided in the pre-class material. Your code must clearly print out the required quantities when executed. The display on screen must clearly say what quantity is being printed (eg: “The mean is: 3.45”, etc.).

Solutions

Expert Solution

#source code:

import numpy as np
from scipy import stats
import math
arr=[1,1,2,2,2,9,-5,-10,8,0]
print("The mean is:",np.mean(arr))
print("The median is:",np.median(arr))
print("The mode is:",stats.mode(arr))
print("The variance is:",np.var(arr))
print("The standard deviation is:",np.std(arr))


#output:

#if you have any doubts comment below..if you like give thumbs up...


Related Solutions

Calculate the mean, median, mode, variance, and standard deviation for the following data set. (5 answers,...
Calculate the mean, median, mode, variance, and standard deviation for the following data set. (5 answers, 0.4 pts each) Number of cigarettes smoked per day was recorded for 10 study subjects. Study Subject # of cigarettes smoked/day A 5 B 7 C 3 D 10 E 6 F 10 G 20 H 0 I 5 J 12
Suppose you calculated the mean, median, mode, and sample standard deviation of a data set. The...
Suppose you calculated the mean, median, mode, and sample standard deviation of a data set. The results are shown below. Mean: 44 Median: 31 Mode: 46 Sample Standard Deviation: 2 If each number in the data set was decreased by 4 units, what would be the new values of these statistics? Fill in your results below. New Mean: New Median: New Mode: New Sample Standard Deviation:
1. Find the mean, median, mode, population standard deviation and variance of the given data: Items:...
1. Find the mean, median, mode, population standard deviation and variance of the given data: Items: 3,5,6,9,10,12,15 Frequency: 1,4,2,12,5,4,2 2.Find the mean, median, mode, sample standard deviation and variance of the discrete frequency distribution: Items: 2,5,6,7,12 Frequency:1,3,10,4,2
What is the relationship of variance and standard deviation to the mean, median and mode?
What is the relationship of variance and standard deviation to the mean, median and mode?
Find the mean, median, mode, and standard deviation of the following set of data: 2, 3,...
Find the mean, median, mode, and standard deviation of the following set of data: 2, 3, 3, 4, 5, 6, 9 Mean_____________________ Median____________________ Mode_____________________ Standard Deviation__________ You roll two fair dice, a green one and a red one. Find the probability of getting a sum of 6 or a sum of 4. ___________________ You draw two cards from a standard deck of 52 cards without replacing the first one before drawing the second. Find the probability of drawing an ace...
Find the mean, median, and mode of the following set of data. (Enter solutions for mode...
Find the mean, median, and mode of the following set of data. (Enter solutions for mode from smallest to largest. If there are any unused answer boxes, enter NONE in the last boxes.) (a) 6 6 7 8 9 12 Mean Median Mode Mode (b) 6 6 7 8 9 108 Mean Median Mode Mode
What are the mean, median, and mode of a set of data, and how do they...
What are the mean, median, and mode of a set of data, and how do they differ from each other? What are the different type measures of dispersion? Provide examples of each from your experience.
Find the mean, median mode(s), range, standard deviation, and variance of the data: 21, 15, 16, 25, 13, 18 5, 3, 2, 6, 5, 2, 5
Find the mean, median mode(s), range, standard deviation, and variance of the data: 21, 15, 16, 25, 13, 18 5, 3, 2, 6, 5, 2, 5
Find the​ (a) mean,​ (b) median,​ (c) mode, and​ (d) midrange for the given sample data....
Find the​ (a) mean,​ (b) median,​ (c) mode, and​ (d) midrange for the given sample data. An experiment was conducted to determine whether a deficiency of carbon dioxide in the soil affects the phenotype of peas. Listed below are the phenotype codes where 1 equals smooth dash yellow1=smooth-yellow​, 2 equals smooth dash green2=smooth-green​, 3 equals wrinkled dash yellow3=wrinkled-yellow​, and 4 equals wrinkled dash green4=wrinkled-green. Do the results make​ sense? 2 1 1 4 1 1 3 4 2 2 2...
Find the​ (a) mean,​ (b) median,​ (c) mode, and​ (d) midrange for the given sample data....
Find the​ (a) mean,​ (b) median,​ (c) mode, and​ (d) midrange for the given sample data. An experiment was conducted to determine whether a deficiency of carbon dioxide in the soil affects the phenotype of peas. Listed below are the phenotype codes where 1 equals smooth dash yellow​, 2 equals smooth dash green​, 3 equals wrinkled dash yellow​, and 4 equals wrinkled dash green. Do the results make​ sense? 2 2 1 4 3 1 4 1 4 2 1...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT