ASSIGNMENT
Semester 2, 2023
STAT7055 Introductory Statistics for Business and Finance
©2023 ANU
INSTRUCTIONS TO STUDENTS
Due Date
• The assignment is due at 9:00am on Friday October13.
• Late submission of the assignment is not permitted. An assignment submitted without an extension after the due date will receive a mark of 0.
Writing your Assignment
●The assignment is an individual piece of assessment and must be completed on your own.
●You are not permitted to use any form of tutoring services (e.g, online, in-person, etc.) or any AI tools (e.g., ChatGPT, etc.).
●You will be required to write a report in an R Markdown document that contains R code (with R code comments),R output and written text. An example of an R Markdown document, which you can use as a template, has been provided on Wattle.
●All R code must have accompanying R code comments that sufficiently describe what the code is doing.
●When answering the assignment questions in your report, you will need to include all your R code and R output that you used to calculate any answers and you must also write your answers in proper sentences. For example, if you are required to calculate a sample mean, then you would include your R code for calculating the sample mean and the R output of the sample mean value and you would also write a proper sentence in the report such as“The sample mean is equal
●Make sure to be clear and concise in your answers.

●A good way to approach writing your report is to imagine that you are a statistical consultant and that a client has asked you to do some statistical analyses. W hen presenting the results of your analyses to the client, you wouldn't just give them pages of R code, R output, calculations, etc. Rather, you should give them a proper report which clearly outlines and explains the results of the analyses and which also includes . the R code and R output used to produce the results.
●Therefore, presentation is very important. Marks will be deducted for poorly presented reports. .
●Once you have finished writing your report in your R Markdown document, you will need to render the document by pressing the K nit button in RStudio to create a HTML file of your report.

●Further to the above point, it is good practice to regularly Knit your R Markdown document as you write your report. This is useful for checking that it's rendering properly.

Submitting your Assignment

●Submission of the assignment will be through Wattle and further details regarding assignment submission will be provided on Wattle.  

For submission you will need to submit two files: the R Markdown file of your report (i.e., a“Rmd”fle) and the rendered HTML fle of your report produced by pressing the Knit button in RStudio (i.e., a“.html" file).

●Please name your two files as“uNNNNNNN.Rmd”and“uNNNNNNN. html”,where uNNNNNNN is your student number. 

No other fle types will be accepted or marked, e.g., “.R”, “.docx”, “.RData”,“.zip”, etc. In particular, do not submit any compressed files.

Other Important Details

●You may only use built-in functions available in the default installation of R and you are not permitted to use functions in any additional R packages (e.g, ggplot2).
●You must use the appropriate R functions (and not the statistical tables) to calculate any critical values or p-values used when performing any hypothesis tests.
You must use R for all calculations.
●Round all final numeric answers to 4 decimal places. However, as you will be using R, keep all decimals during all intermediate steps to ensure the accuracy of your final numeric answer.
●Please use the help function if you want to learn more about a particular R function, e.g., enter help(mean) in the R console to learn more about the mean function.
●For questions that require writing mathematical symbols, you are welcome to use short- hand notation, provided you make the meaning clear (e.g., using “Mu”for μ, or“!=” for≠).
●Answers (including hypotheses, explanations, conclusions, etc.) need to be written in
the text of the R Markdown document and not in the R code comments or the R output.

●Do not print out entire data sets in your R Markdown document or HTML file, as this will only take up unnecessary space.

Question 1 [12 marks]

Randy is attending film school and one of his projects involves researching the ratings given to movies by critics and viewers. He has selected a random sample of movies and has recorded the average critic score (X1) and the average viewer score (X2) for each movie. The scores were obtained from a website that collates movie reviews and ratings submitted by critics and viewers. Randy also recorded the genre (X3) of each movie. The  data are stored in the fle Assi gnmentData. RData in the data frame movies.df .
(a) [3 marks] Create a scatter plot of average critic score against average viewer score  for comedies, with average viewer score along the x-axis. Make sure to give your . plot a proper descriptive title and appropriate labels for the x and y axes. Describe the relationship between these two variables for comedies.
(b) [2 marks] Determine whether the average critic scores and the average viewer scores are more highly correlated for comedies or for thrillers. Provide a clear justification for your answer.
(c) [3 marks] For thrillers, test whether the population proportion of movies that have an average viewer score greater than 3.27 is less than 0.5. Clearly state your hypothe- ses, making sure to define any parameters, and use a significance level of a = 3%. Do not use any R functions that are designed to perform hypothesis tests.
(d) [4 marks] For dramas, test whether the population mean average viewer score is greater than the population mean average critic score by more than 0.05. Clearly state your hypotheses, making sure to define any parameters, and use a significance level ofa = 3%. Do not use any R functions that are designed to perform hypothesis . tests.

Presentation [3 marks]

Marks will be allocated for how well presented your report is, e.g., clear and distinct headings, concise answers with information clearly communicated, all R code sufficiently commented, etc.
END OF ASSIGNMENT