## Problem 6.1 is on EPage 182 ## source('../Chapter6/chap_6_prob_1.R') LS = 0 US = 4 ## Compute C_p: ## C_p = (US-LS) /(6*s) print(sprintf('C_p= %f', C_p)) ## Compute C_{pk}: ## C_pk = min(c((x_bar - LS)/(3*s), (US - x_bar) /(3*s))) print(sprintf('x_bar= %f; LS= %f; US= %f; C_pk= %f', x_bar, LS, US, C_pk)) ## Compute P_{PK}: ## sigma_xbar = sd(DF$average) sigma_x = sigma_xbar*sqrt(n) P_PK = (US-LS)/(6*sigma_x) print(sprintf('sigma_xbar= %f; sigma_x= %f; P_PK= %f', sigma_xbar, sigma_x, P_PK))