PLEASE USE C++ AND PLEASE COMPLETE THIS CODE #include #include #include using namespace std; class Weibull { private: double alpha; double beta; double meanResult; public: Weibull(); ~Weibull(); void Density(Weibull, Weibull); void Mean(double, double); void displayResults(Weibull, Weibull); }; Weibull::Weibull() { this->alpha = 0; this->beta = 0; this->meanResult = 0; } Weibull::~Weibull() { } void Weibull::Density(Weibull distribution2, Weibull distribution3) { //Complete this function. } void Weibull::Mean(double alpha, double beta) { this->alpha = alpha; this->beta = beta; this->meanResult = beta * (tgamma(1 + 1 / alpha)); } void Weibull::displayResults(Weibull distribution2, Weibull distribution3) { cout > alpha; cout > beta; switch (x) { case 1: assignProperties(distribution1, alpha, beta); break; case 2: assignProperties(distribution2, alpha, beta); break; case 3: assignProperties(distribution3, alpha, beta); break; } } distribution1.displayResults(distribution2, distribution3); distribution1.Density(distribution2, distribution3); return 0; } void assignProperties(Weibull& distribution, double alpha, double beta) { distribution.Mean(alpha, beta); }
The Weibull Distribution is used to assess product reliability and model failure times. We can determine if the number of failures is increasing with time, decreasing with time, or remaining constant. The following equations are used to compute for the Weibull Distribution of a product: Density Function f(x) = axtle 1-1e-G) where x 20, a > 0.8 >0 Cumulative P(X
) = f(x) dx = 17) u = E(X)= B.1(1+ Mean Variance o? = V(X) = 821(1+ Alpha (a) Properties Also known as Shape Parameter, Weibull Scope, or Threshold Parameter. Beta (B) Properties Also known as Scale Parameter or Characteristic Life Paramter. Ifa1, failure rate increases with time. If a=1, failure rate is constant. Here is an example of the Probability Density with respect to time (x): 0.025 0.020 7.00 0.015 Probability Density Figure 1: Taken from http://www.engineered software.comasa/weibull.htm. pa 0.010 Det 50 10 200 0.005 Based on Figure 1, failure rates can increase or 0.000 decrease with respect to time and depending on the alpha and beta properties of the product. For this machine problem, create a program that will replicate the Weibull Distribution below. Weibull Distribution x = 10, p=0.5 = 10. = 11 0.8 >0 Cumulative P(X) = f(x) dx = 17) u = E(X)= B.1(1+ Mean Variance o? = V(X) = 821(1+ Alpha (a) Properties Also known as Shape Parameter, Weibull Scope, or Threshold Parameter. Beta (B) Properties Also known as Scale Parameter or Characteristic Life Paramter. Ifa1, failure rate increases with time. If a=1, failure rate is constant. Here is an example of the Probability Density with respect to time (x): 0.025 0.020 7.00 0.015 Probability Density Figure 1: Taken from http://www.engineered software.comasa/weibull.htm. pa 0.010 Det 50 10 200 0.005 Based on Figure 1, failure rates can increase or 0.000 decrease with respect to time and depending on the alpha and beta properties of the product. For this machine problem, create a program that will replicate the Weibull Distribution below. Weibull Distribution x = 10, p=0.5 = 10. = 11