Simple Statistics Given a set of numerical data, there are several ways in which to describe...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Simple Statistics Given a set of numerical data, there are several ways in which to describe it. One way is the so- called 5-number summary. The five numbers used to describe the data set are the following: the minimum value, the first quartile, the median, the third quartile and the maximum value. The definition of the minimum and maximum values are obvious. The median of a set of numbers is the value of the number which would lie exactly in the middle of the set if it were sorted. For example, the median of the data set 7, -1, 9, 4, 1 would be 4. If there is an even number of values in the set, then the median is the average of the two values closest to the middle; if our set contained the values 7, -1, 9, 4, 1, 0 then the median would be (1 + 4)/2 = 2.5. The definition of the quartiles follows naturally from the definition of the median. If we take all the values that come before the median in the sorted list (in the case when we average two values for the median this set would include the lower of those two numbers) the first quartile is the median of this set. The definition of the third quartile is identical except it uses those values that come after the original median. In our example above with 7, -1, 9, 4, 1, 0, the first quartile value would be 0 (the median of the value -1, 1 and 0 which are less than 2.5) and the third quartile would be 7. If the data set contained 1, 2, 2, 2, 3 (in any order), then the median would be 2, and the first and third quartiles would be 1.5 and 2.5, respectively. One special case is when there is only one element in the list, in which case the quartiles are equal to the median. One other way to characterize data is its skewness. A distribution is considered right-skewed whenever the maximum value is farther from the median than the minimum value, or when the maximum and minimum are equally distant from the median, but the third quartile is farther from the median than the first quartile. A left-skewed distribution is one with the opposite situation. For our purposes, a distribution which is neither left-skewed nor right-skewed is considered symmetric. Your task for this problem is to read in various sets of numbers and output the 5-number summary for each, along with the skewness of the data. Input There will be multiple input sets. Each input set will consist of a single line of the form nv, V2 V3 -.. Vn where n is the number of data values, and v4,. Vn are the values. All the values will be integers and the maximum value for n will be 100. A line which begins with 0 indicates end of input and should not be processed. All input will be from a file in.dat. Output For each input set, output the 5-number summary and skewness in the order minimum, first quartile, median, third quartile, maximum and skew, with a single space between each. Skew will either be the phrase right-skewed, left-skewed or symmetric. All output will be to the screen and written to a file: analyzed_data.dat. Sample Input 67-19410 15 15 14 13 12 11 10 9 87 6 5 4 32 1 15 15 14 13 12 11 10 9 876 5 4 3 20 Sample Output -10 2.5 79 right-skewed 148 12 15 symmetric 048 12 15 left-skewed Simple Statistics Given a set of numerical data, there are several ways in which to describe it. One way is the so- called 5-number summary. The five numbers used to describe the data set are the following: the minimum value, the first quartile, the median, the third quartile and the maximum value. The definition of the minimum and maximum values are obvious. The median of a set of numbers is the value of the number which would lie exactly in the middle of the set if it were sorted. For example, the median of the data set 7, -1, 9, 4, 1 would be 4. If there is an even number of values in the set, then the median is the average of the two values closest to the middle; if our set contained the values 7, -1, 9, 4, 1, 0 then the median would be (1 + 4)/2 = 2.5. The definition of the quartiles follows naturally from the definition of the median. If we take all the values that come before the median in the sorted list (in the case when we average two values for the median this set would include the lower of those two numbers) the first quartile is the median of this set. The definition of the third quartile is identical except it uses those values that come after the original median. In our example above with 7, -1, 9, 4, 1, 0, the first quartile value would be 0 (the median of the value -1, 1 and 0 which are less than 2.5) and the third quartile would be 7. If the data set contained 1, 2, 2, 2, 3 (in any order), then the median would be 2, and the first and third quartiles would be 1.5 and 2.5, respectively. One special case is when there is only one element in the list, in which case the quartiles are equal to the median. One other way to characterize data is its skewness. A distribution is considered right-skewed whenever the maximum value is farther from the median than the minimum value, or when the maximum and minimum are equally distant from the median, but the third quartile is farther from the median than the first quartile. A left-skewed distribution is one with the opposite situation. For our purposes, a distribution which is neither left-skewed nor right-skewed is considered symmetric. Your task for this problem is to read in various sets of numbers and output the 5-number summary for each, along with the skewness of the data. Input There will be multiple input sets. Each input set will consist of a single line of the form nv, V2 V3 -.. Vn where n is the number of data values, and v4,. Vn are the values. All the values will be integers and the maximum value for n will be 100. A line which begins with 0 indicates end of input and should not be processed. All input will be from a file in.dat. Output For each input set, output the 5-number summary and skewness in the order minimum, first quartile, median, third quartile, maximum and skew, with a single space between each. Skew will either be the phrase right-skewed, left-skewed or symmetric. All output will be to the screen and written to a file: analyzed_data.dat. Sample Input 67-19410 15 15 14 13 12 11 10 9 87 6 5 4 32 1 15 15 14 13 12 11 10 9 876 5 4 3 20 Sample Output -10 2.5 79 right-skewed 148 12 15 symmetric 048 12 15 left-skewed
Expert Answer:
Answer rating: 100% (QA)
The here represents spaces as this app gives trouble while1 l llistmapintinpu... View the full answer
Related Book For
Materials and process in manufacturing
ISBN: 978-0471656531
9th edition
Authors: E. Paul DeGarmo, J T. Black, Ronald A. Kohser
Posted Date:
Students also viewed these programming questions
-
Given a set of k-tuples ( x11, x12, . . ., x1k), ( x21, x22, . . ., x2k), . . ., and ( xn1, xn2, . . ., xnk), the extent of their association, or agreement, may be measured by means of the...
-
Given a set of n linearly related points, (x1, y1), (x2, y2), . . . , and (xn, yn), use the least squares criterion to find formulas for (a) a if the slope of the xy-relationship is known to be b....
-
Moreover, calculate the (approximate) value of the 45th percentile. 1. (3 points) Circle the data set with the largest standard deviation. 2 1 34 2. (3 points) Most affected by extreme values. A....
-
Acculturation is an extremely important topic in this age of globalization and multiculturalism; however, it remains an especially difficult topic to study. Peoples acculturation experiences vary...
-
How should a monopsonist decide how much of a product to buy? Will it buy more or less than a competitive buyer? Explain briefly.
-
It is your responsibility, as the new head of the automotive section of Nichols Department Store, to ensure that reorder quantities for the various items have been correctly established. You decide...
-
In August 2014, Superior Structures of Ohio, LLC, and its president, Ryan Villhauer, applied for credit with Willoughby Supply Company, Inc. The application contained a section providing for a...
-
Eclipse Systems manufactures an optical switch that it uses in its final product. The switch has the following manufacturing costs per unit: Direct Materials..................................$ 11.00...
-
Explain how the relative prices of rugs and robots in autarky compare with the relative prices when Canada and India start to trade? In your answer explain which country will export/import which...
-
Easley-O?Hara Office Equipment sells furniture and technology solutions to consumers and to businesses. Most consumers pay for their purchases with credit cards and business customers make purchases...
-
The Federal Reserve has raised the Federal Funds rate by 3.75 percent within the past year. If a bank had capital of 10 percent. When the Fed began raising rates and has no loans at risk of default....
-
Finally, in column J compare your company's ratios to the industry's ratios. Enter a 'U' if your firm's ratios compare unfavorably with industry standards. Enter an 'F' if your firm's ratios compare...
-
HOW TO BUILD A HAPPY MARRIAGE. Kindly send your source.
-
How can this phenomenon be explained using the Heckscher-Ohlin model? "Singapore in 1965 was a low-skill labour abundant country compared to the rest of the world and exported low skill labour...
-
Writing an informal Business Report The Scenario The medium size tech company that employs you provides advisory and professional services. In consideration of the trend toward remote work they...
-
In 1973 , 1979, and 2007 we saw a very dramatic increase in the price of oil. As a result, in 1973 and 1979 we saw double digit inflation, but in 2007 we saw a much lower rate of inflation. Why did...
-
Based on the readings and Learning Module: Network Diagram and Critical path, build a network diagram for the "project" below and answer the questions. Consider the table below as a small project...
-
Based on the scenario described below, generate all possible association rules with values for confidence, support (for dependent), and lift. Submit your solutions in a Word document (name it...
-
What is the major disadvantage of a micrometer caliper as compared with a vernier caliper? The advantages?
-
What are some of the attractive features of electron-beam welding?
-
What types of composite materials can be produced through powder metallurgy?
-
Show that if a liquid is in equilibrium with its own vapour and an inert gas in a closed vessel, then \[\frac{\mathrm{d} p_{v}}{\mathrm{~d} p}=\frac{ho_{v}}{ho_{l}}\] where \(p_{v}\) is the partial...
-
a. Describe the meaning of the term thermodynamic equilibrium. Explain how entropy can be used as a measure of equilibrium and also how other properties can be developed which can be used to assess...
-
Show that when different phases are in equilibrium the specific Gibbs energy of each phase is equal. Using the following data, show the pressure at which graphite and diamond are in equilibrium at a...
Study smarter with the SolutionInn App