HW 10 统计计算方法代写 Question (7 pts) Recall the Beta distribution, which is defined for θ ∈ (0, 1) with parameters α and β, has a density proportional to: Question (7 pts) 统计计算方法代...View details
R作业代写 1.There is a raging debate among King’s undergraduate students about whether at the end of the first year. BSc Electronic Engineering (EE) students
There is a raging debate among King’s undergraduate students about whether at the end of the first year. BSc Electronic Engineering (EE) students are better rounded coders than BSc Neuroscience and Psychology (N&P) students. As N&P students are also statisticians, they are asked to resolve this question using χ2 analysis.
[i] Initialise any libraries you will need for this entire question at the start of the question, updating the list during the question if needed. R作业代写
[ii] A difficult pass or fail Coding Versatility Test is voluntarily administered at the end of the first year and 63 N&P students take the test. While 108 EE students take the test. Prepare a contingency table that reflects the results that 39 N&P students pass. And 52 EE students pass too, while all other students fail to reach the pass mark. EXTRA COMMENTS: How would you explain what the output of your contingency table shows to a fellow student finding it very difficult to understand?
[iii] Carry out a χ2 analysis initially displaying the test result on the console.
[iv] Extract all the relevant outputs from the statistical calculation and use them to report the results. Include the odds ratio as a way of interpreting the results and using statistics to contribute to the raging debate.
[v] EXTRA COMMENTS: you are asked by the EE students what the p value in this case means. Give a non-specialist explanation reported as a console output to go with the statistics.
Here we will build and manipulate some trigonometric functions y with an x range of -10 to +10 in steps of 0.025.
[i] A sine function has the form y = A sin(kx + phi). On a graph, plot a first function y1 with A1 = 1, k1 = 6/π and phi1 = 0.
[ii] add on to the first graph a second plot y2 with A2 = 2, k2 = 2/π and phi2 = 0.
[iii] Add a third plot, y3 which should have an amplitude that is halfway between y1 and y2. And have twice as many cycles as y1 and a phase similar to the other two. Report the values of A3 and k3 used for your graph.
EXTRA COMMENTS: What would a change in the value of phi in the equations do to the function? Why do you think it has been left at zero?
[iv] Use a loop to produce the Fourier Series function y4 below estimated using the first 25 harmonics (N=25) with the same x range as y1-3.