Untitled

Quarto

Quarto enables you to weave together content and executable code into a finished document. To learn more about Quarto see https://quarto.org.

Running Code

When you click the Render button a document will be generated that includes both content and the output of embedded code. You can embed code like this:

1 + 1
[1] 2

You can add options to executable code like this

[1] 4

The echo: false option disables the printing of code (only output is displayed).

play_bill=read.csv("/Users/Daniel/Downloads/playbill.csv")
head(play_bill)
        Production CurrentWeek LastWeek
1      42nd Street      684966   695437
2         Avenue Q      502367   498969
3 Beauty and Beast      594474   598576
4    Bombay Dreams      529298   528994
5          Chicago      570254   562964
6          Dracula      319959   282778
plot(CurrentWeek~LastWeek,play_bill)

reg_an<-lm(CurrentWeek~LastWeek,play_bill)
plot(CurrentWeek~LastWeek,play_bill)
abline(lm(CurrentWeek~LastWeek,play_bill))

confint(reg_an, level=0.95)
                    2.5 %       97.5 %
(Intercept) -1.424433e+04 27854.099443
LastWeek     9.514971e-01     1.012666

Yes, 1 is a plausible value for Beta_1, because our confidence interval is between about .95149 and 1.101266.

Using the confidence interval above, the 95% prediction interval for a prediction worth $400,000 would be (-14,244.33+.95149*400,000, -14,244.33+1.012666*400,000)=(366,351.67, 390,822.07).

It would not be reasonable for promoters to expect equal sales from last week’s show, since $400,000 is not contained in the 95% confidence interval.