Problem 1:
.
For the question, please follow the file called manufacturing defects.txt while reading the text below.
In each year from 2000 to 2019, the number of manufacturing defects in auto manufacturers were counted. The data was collected from 14 different auto manufactory companies. The numbers of defects for the companies are indicated in 14 columns following the year column. Assume that the number of manufacturing defects per auto company per year is a random variable having a Poisson() and that the number of defects in different companies or in different years are independent.
(Note: You should implement a code for your calculations for each following subproblem. You are free to use any programming languages (Python, R, C, C++, Java) and their related library.)
- Give a table how many cases occur for all companies between 2000 and 2019 for each number of defects (# of Defects).
Hint: When you check the file you will see: # of Defects = {0, 1, 2, 3, 4}.
- Estimate from the given data.
- Update Table 1 in Table 2 with Poisson predicted cases with the estimated .
- Draw a barplot for the actual cases (Table 2 in column 2) and the predicted cases (Table 2 column 3) with respect to # of defecrs. You should put the figure.
# ofDefects | # of cases in all company between the years |
01234 |
Table 1: Actual cases
# ofDefects | # of cases in all companies between the years | Predicted # of cases in all companies between the years |
01234 |
Table 2: Actual vs. Predicted Cases
- According to the barplot in (c), does the poisson distribution fit the data well? Compare the values of the actual cases and the values of the poisson predicted cases, and write your opinions about performance of the distribution.
- According to your estimations above, write your opinions considering your barplot and Table 2. Which company do you prefer to buy a car? Why?
- Paste your code that you implemented for the subproblems above. Do not forget to write comments on your code. Example:
- The common code block for all subproblems
Paste here. Your code should read the file and compute other things which the following subproblems need.
- The code block for (a)
Paste here. Your code should compute the values in Table 1 column 2.
- The code block for (b)
Paste here. Your code should compute .
- The code block for (c)
Paste here. Your code should compute the values in Table 2 column 3.
- The code block for (d)
Paste here. Your code should draw the barplot.
Reviews
There are no reviews yet.