Load libraries

library(dplyr)
library(FrF2)
library(tidyverse)
library(magrittr)
library(tidyr)
library(fpp2)   
library(caTools)
library(reshape2)
library(psych) 
library(fBasics)
library(kableExtra)

Question 12.1

Describe a situation or problem from your job, everyday life, current events, etc., for which a design of experiments approach would be appropriate.

Answer:

One situation I had in product development was in the robustness testing phase. We had 24 test units and we split into 6 units of 4 different types of robustness testing. The test matrix had 4 different type of of test scenarios; for instance one would be tested with water immersion, followed by vibration, followed by drop test, followed by solar UV exposure etc..

Each test has its slightly different “scenario” and the test units will undergo these different exposures. The objective is to see which units will failed and more importantly how and when it will failed. By understanding the various conditions these test units will failed or survived, we can reinforce the design to counter act its failure points and make strenghten those “weak” points of design


Question 12.2

Below is the implementation of the fractional factorial design for 16 open houses based on 10 features. Output below shows which house should have which features to show to prospective house buyers.


set.seed(512)

houses <- FrF2(
  nruns=16, nfactors=10, 
  factor.names = c(
    'Large Yard', 'Pool', 'Barrel Tile', 'Long Driveway', 'Multi Car Garage',
    'More than 3 Bedrooms', 'Modern Kitchen', 'Gated Community', 'Gazebo', 'HOA'
    ),
  default.levels = c('Yes', 'No')
  ) %>% 
  as_tibble() %>% 
  rownames_to_column('House')


kable(houses)
House Large.Yard Pool Barrel.Tile Long.Driveway Multi.Car.Garage More.than.3.Bedrooms Modern.Kitchen Gated.Community Gazebo HOA
1 No Yes No Yes Yes No Yes Yes No No
2 No No No No No No No No No No
3 Yes Yes No Yes No Yes Yes No No Yes
4 Yes Yes No No No Yes Yes Yes Yes No
5 Yes No No Yes Yes Yes No No Yes No
6 Yes Yes Yes No No No No Yes No Yes
7 Yes Yes Yes Yes No No No No Yes No
8 Yes No Yes Yes Yes No Yes No No Yes
9 Yes No Yes No Yes No Yes Yes Yes No
10 No Yes Yes Yes Yes Yes No Yes Yes Yes
11 No No No Yes No No No Yes Yes Yes
12 No Yes No No Yes No Yes No Yes Yes
13 Yes No No No Yes Yes No Yes No Yes
14 No No Yes No No Yes Yes No Yes Yes
15 No Yes Yes No Yes Yes No No No No
16 No No Yes Yes No Yes Yes Yes No No

Question 13.1

For each of the following distributions, give an example of data that you would expect to follow this distribution (besides the examples already discussed in class). a. Binomial - If you purchase a lottery ticket, you’re either going to win money, or you aren’t

  1. Geometric - you ask people outside a polling station who they voted for until you find someone that voted for your candidate in a local election. The geometric distribution would represent the number of people who you had to poll before you found someone who voted for your candidate. You would need to get a certain number of failures before you got your first success

  2. Poisson - The number of patients arriving in an emergency room between 10 and 11 pm

  3. Exponential - The amount of time your favorite sporting team has to lose before its first ever win

  4. Weibull - Predicting failures: The Bathtub Curve and Product Failure Behavior. In this respect, Reliability specialists often describe the lifetime of a population of products using a graphical representation called the bathtub curve. The bathtub curve consists of three periods: an infant mortality period with a decreasing failure rate followed by a normal life period (also known as “useful life”) with a low, relatively constant failure rate and concluding with a wear-out period that exhibits an increasing failure rate.