Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

PLEASE TYPE OUT THE ANSWER SO I CAN BETTER UNDERSTAND IT, NO PICTURES PLEASE. TH

ID: 3353259 • Letter: P

Question

PLEASE TYPE OUT THE ANSWER SO I CAN BETTER UNDERSTAND IT, NO PICTURES PLEASE. THANKS!

The following data represents the normal monthly precipitation for a certain city Month, x January, 1 February, 2 March, 3 April, 4 May, 5 une, b July, 7 August, 8 September, 9 October, 10 November, 11 December, 12 Draw a scatter diagram of the data for one period. (You do not need to submit the scatter diagram) Normal Monthly Precipitation, inches 3.91 4.36 5.31 6.21 7.02 7.84 8.19 8.06 7.41 6.30 5.21 4.28 Find the sinusoidal function of the form y-Asin(wx-) + B that fits the data. Show your work

Explanation / Answer

datnew = data.frame(num = c(1,2,3,4,5,6,7,8,9,10,11,12), nmp = c(3.91,4.36,5.31,6.21,7.02,7.84,8.19,8.06,7.41,6.3,5.21,4.28))

ssp <- spectrum(datnew$nmp)
per <- 1/ssp$freq[ssp$spec==max(ssp$spec)]
reslm <- lm(datnew$nmp ~ sin(pi/per*datnew$num) + cos(pi/per*datnew$num))
summary(reslm)

rg <- diff(range(datnew$nmp))
plot(datnew$nmp ~ datnew$num,ylim=c(min(datnew$nmp)-0.1*rg,max(datnew$nmp)+0.1*rg))
lines(fitted(reslm)~datnew$num,col=4,lty=2) # dashed blue line is sin fit

# Converting sum of sin and cos to a single sin with phase

# phase = pi + arctan(c1/c2); c1 is coeff of cos and c2 is coeff of sin
c2 = 4.5116
c1 = -1.1171

phi = pi + atan(c1/c2)
# phi = 2.898868
A = sqrt(c1^2 + c2^2)
# A = 4.647843
1/per
# coefficient of x = 0.08333333

B = 3.2262

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote