The due date for this final project is 12/13/2024 Friday noon. You need to email both RMD file and PDF to me by the due date. Please make your final name to be Final Project_Your First Name_Your Last Name.RMD and Final Project_Your First Name_Your Last Name.PDF. For example, mine would be Final Project_Hunter Park_RMD and Final Project_Hunter Park_PDF. Otherwise, you will lose some points. Total point is 100 and you will lose 1 point per minute after the due date. For example, if you submit it 12:30 on 12/13, your maximum score is 70/100. In short, be punctual and hand it in on time.
This final project should be your original work. You should not work with others or seek help from internet such as Google or ChatGPT. There will be serious penalty for suspicious solutions (solutions that are too good to be done by undergraduate students such as using advanced mathematical theory).
Your code must run without errors. If for any reason it does not run and does not produce desired results, it will be counted as zero.
Let \(a\) is the month of your birthday and \(b\) is the day of your birthday (if you were born in December 15th, \(a\) is 12 and \(b\) is 15). Suppose that box 1 has \(a\) black balls and \(b\) white balls and box 2 has \(b\) black balls and \(a\) white balls. One ball is picked randomly from box 1 and is moved into box 2. From the box 2, another ball is selected and moved into box 1. Then, one ball is picked randomly from box 1.
Your answer here.
Your answer here.
# Your code here
In this question, we compute the number of rolls of fair 6-sided dice until the first time the total sum of all rolls is a prime.
# Your code here
# Your code here
# Your code here
# Your code here
# Your code here
# Your code here
# Your code here
# Your code here
In this problem, you will find an optimal number of airline tickets that maximizes revenue. Here is a setup. In a certain airline route (The Airbus A380), there are 853 seats and each ticket is sold at $2000. It costs $3550 for the airline for each bumped passenger for accommodations. For simplicity, we assume that each person travels individually rather than in groups, and all airline tickets are sold completely. The probability that each person who purchases a ticket shows up on time at the airport is \(p=92\%\).
Your answer here.
Your answer here.
Your answer here.
Your answer here.
# Your code here
# Your code here
Your answer here.
In this homework, you will be working on the iris dataset containing four features (length and width of sepals and petals) of 50 samples of three species of Iris (Iris setosa, Iris virginica and Iris versicolor), and perform PCA analysis.
First, install and load corrr, ggcorrplot, factoextra, FactoMineR and corrplot packages.
# your code here
Import dataset iris (this can be done by typing attach(iris)). Do a quick data exploration such as summary, head, tail. How many rows and columns does it have?
# your code here
The presence of missing values can bias the result of PCA. Therefore, it is highly recommended to perform the appropriate approach to tackle those values. Check if there are any missing values.
# your code here
PCA can be done only for numeric values. From the data, select only numeric values and perform another quick data exploration. Then, normailze the data using scale function.
# your code here
Perform the PCA using princomp function.
# your code here
Then, decide the number of principal components consisting of more than 95% of the data.
# your code here
Vidualize the those components chosen above using fviz_eig, fviz_pca_var, fviz_cos2, fviz_pca_var functions.
# your code here
A sample of 10 billionaires is selected, and the person’s age and net worth are compared. The data are given here.
Using the data set provided, do the following:
x <- c(56,39,42,60,84,37,68,66,73,55)
y <- c(18,14,12,14,11,10,10,7,7,5)
# Your code here