Write a program that estimates whether a given set of five


Question: An engineer in a laboratory can perform fairly sophisticated tests and repairs on prototype products. In the field, particularly for consumer goods, tests and repairs must be simple or the cost of maintenance will be prohibitive. Machines that self-diagnose failures require especially simple tests. You are designing a simple algorithm to be implemented on a chip. The chip will be embedded in a complex machine to diagnose possible incipient failures. The chip will perform its diagnosis based on the knowledge that when all is going well, two measurable quantities x and y will vary as

y = 2x + 3

Write a program that estimates whether a given set of five user-input (x, y) pairs (representing data observed by the self-monitoring machine) fits the "ok" line closely enough. Generate 21 points on the line, using x between 0 and 20. Then combine the field data with these points and compute the correlation coefficient for the entire data set. If the correlation coefficient falls below 0.98, issue a possible chip failure message.

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: Write a program that estimates whether a given set of five
Reference No:- TGS02578095

Expected delivery within 24 Hours