Questions
The questions involve the data set for asking prices of Richmond townhouses obtained on 2014.11.03. For...

The questions involve the data set for asking prices of Richmond townhouses obtained on 2014.11.03.
For your subset, the response variable is:
asking price divided by 10000:
askpr=c(55.8, 48.5, 57.8, 108.8, 50.5, 53.9, 33.7, 53.8, 78.8, 51.99, 47.9, 45.99, 77.8, 52.4, 58.68, 47.8, 59.8, 48.8, 57.8, 40.9, 68.5, 79.8, 68.8, 65.99, 40.8, 73.9, 54.98, 51.68, 73.8, 81.9, 86.8, 41.99, 50.8, 25.9, 58.8, 26.99, 62.9, 55.2, 54.8, 71.99, 56.8, 79.99, 74.8, 61.5, 68.8, 50.8, 53.8, 57.5, 44.8, 65.8)
The explanatory variables are:
(i) finished floor area divided by 100
ffarea=c(13.06, 14.8, 12.01, 23.98, 12.26, 11.84, 12, 12.22, 19.48, 12.09, 12.1, 16.01, 16.5, 16.22, 13.96, 13.34, 17.63, 14.8, 13.84, 16.06, 13.59, 15.25, 15.95, 22.78, 14, 15.15, 13.06, 15.1, 17.54, 20.95, 15.08, 12.9, 12.27, 6.1, 17.37, 10.5, 14, 15.3, 11.26, 15.05, 15.5, 22, 17.48, 14.5, 16.9, 16.6, 10.95, 13.46, 9.4, 13.45)
(ii) age
age=c(0, 24, 0, 16, 3, 15, 28, 9, 11, 7, 7, 25, 3, 25, 9, 32, 26, 50, 10, 25, 2, 3, 18, 35, 38, 0, 1, 20, 9, 19, 1, 44, 17, 11, 26, 37, 5, 9, 0, 8, 23, 20, 5, 7, 8, 23, 18, 10, 14, 1)
(iii) monthly maintenance fee divided by 10
mfee=c(18.6, 16.1, 14.2, 36.9, 18, 21, 25.9, 18.5, 20.4, 18.1, 18, 33.7, 25.4, 36.4, 22, 24.5, 32, 25, 16, 24.4, 17, 35, 23.6, 57.4, 23, 22.2, 19.6, 24.5, 18.2, 34.8, 48.8, 23.2, 25.2, 17.1, 31, 28, 19.6, 16.9, 24.8, 22.3, 17.4, 26.7, 29.7, 18.7, 19.4, 19.9, 24.7, 22.1, 23.3, 18.2)
(iv) number of bedrooms
beds=c(3, 3, 3, 3, 3, 2, 2, 3, 3, 3, 3, 3, 4, 3, 3, 3, 5, 3, 3, 2, 3, 2, 3, 2, 3, 4, 3, 3, 4, 1, 3, 3, 2, 1, 3, 2, 3, 3, 2, 3, 3, 3, 4, 3, 4, 4, 2, 3, 2, 3)
You are to make a prediction of the response variable when ffarea=18, age=10, mfee=30, beds=4.

You are to fit three multiple regression models with the response variable askpr:
(i) 2 explanatory variables ffarea, age
(ii) 3 explanatory variables ffarea, age, mfee
(iii) 4 explanatory variables ffarea, age, mfee, beds
After you have copied the above R vectors into your R session, you can get a dataframe with
richmondtownh=data.frame(cbind(askpr,ffarea,age,mfee,beds))

Please use 3 decimal places for the answers below which are not integer-valued
Part a)
The values of adjusted R2R2 for the above models with 2, 3 and 4 explanatory variables are respectively:
2 explanatory:
3 explanatory:
4 explanatory:


Part b)
For the best of these 3 models based on adjusted R2R2, the number of explanatory variables is:


Part c)
For the best of these 3 models based on adjusted R2R2, the least squares coefficient for ffarea is

and a 95% confidence interval for βffareaβffarea is
to

Part d)
For the best of these 3 models based on adjusted R2R2, get the prediction, SE and 95% prediction interval when the future values of the explanatory variables are: ffarea=18, age=10, mfee=30, beds=4.
prediction:  and its SE  ,
and the upper endpoint of the 95% prediction interval is

In: Statistics and Probability

Define a function file_to_hist() which takes a string representing a filename, opens the file, reads its...

Define a function file_to_hist() which takes a string representing a filename, opens the file, reads its contents, closes the file,* and returns a histogram based on the letter frequencies in the given file. If no such file exists, your function should return an empty histogram (i.e., an empty dictionary {}). So for example, if the file nash.txt was in the same directory as char_hist3.py and had the following contents:

I have never seen a purple cow,
And I never hope to see one.
But I can tell you anyhow,
I'd rather see than be one.

Then file_to_hist("nash.txt") would return the following histogram: {'r': 5, 'w': 2, 't': 5, ',': 2, 'u': 3, 'o': 7, 'B': 1, 'b': 1, 'p': 3, 's': 3, 'd': 2, 'l': 3, '\n': 4, 'A': 1, 'h': 5, '.': 2, 'n': 9, 'a': 6, 'v': 3, 'y': 2, ' ': 22, 'I': 4, "'": 1, 'c': 2, 'e': 18}.

You must use the provided make_hist() function in your definition.

You should be using with and as to make sure that the file gets closed automatically. You do not need to use .close()

def make_hist(string):
    """
    returns a histogram based on the given string.
  
    str -> histogram
    """
    hist = {}
    for char in string:
        if char in hist:
            hist[char] += 1
        else:
            hist[char] = 1
    return hist

In: Computer Science

The gravimetric analysis of iron in an ore sample was performed by digesting the sample in...

The gravimetric analysis of iron in an ore sample was performed by digesting the sample in strong acid, followed by precipitation of Fe(OH)3 using KOH, filtration of the crystalline iron hydroxide, and finally drying and ignition at high temperature to produce Fe2O3. After cooling in a dessicator, two different students got the following replicate results:

Student 1, Trial 1 – 0.2109 g of ore results in 0.04594 g iron (III) oxide

Student 1, Trial 2 – 0.2110 g of ore results in 0.04596 g iron (III) oxide

Student 1, Trial 3 – 0.2109 g of ore results in 0.04594 g iron (III) oxide

Student 1, Trial 4 – 0.2112 g of ore results in 0.04601 g iron (III) oxide

Student 2, Trial 1 – 0.2111 g of ore results in 0.04601 g iron (III) oxide

Student 2, Trial 2 – 0.2108 g of ore results in 0.04594 g iron (III) oxide

Student 2, Trial 3 – 0.2109 g of ore results in 0.04596 g iron (III) oxide

Student 2, Trial 4 – 0.2109 g of ore results in 0.04596 g iron (III) oxide

A.)Calculate the percent iron in the ore samples and report mean values for each Student

(Atomic Weights: Fe = 55.845, O = 15.9994)

In: Chemistry

The Harris Company is the lessee on a four-year lease with the following payments at the...

The Harris Company is the lessee on a four-year lease with the following payments at the end of each year:

Year 1: $ 11,000
Year 2: $ 16,000
Year 3: $ 21,000
Year 4: $ 26,000


An appropriate discount rate is 7 percentage, yielding a present value of $61,233.

a-1. If the lease is an operating lease, what will be the initial value of the right-of-use asset?
a-2. If the lease is an operating lease, what will be the initial value of the lease liability?
a-3. If the lease is an operating lease, what will be the lease expense shown on the income statement at the end of year 1?
a-4. If the lease is an operating lease, what will be the interest expense shown on the income statement at the end of year 1? (Leave no cells blank – be certain to enter “0” wherever required.)
a-5. If the lease is an operating lease, what will be the amortization expense shown on the income statement at the end of year 1? (Leave no cells blank – be certain to enter “0” wherever required.)
b-1. If the lease is a finance lease, what will be the initial value of the right-of-use asset?
b-2. If the lease is a finance lease, what will be the initial value of the lease liability?

In: Finance

FOR PYTHON: Write a python program for a car salesperson who works a five day week....

FOR PYTHON:

Write a python program for a car salesperson who works a five day week. The program should prompt for how many cars were sold on each day and then prompt for the selling price of each car (if any) on that day. After the data for all five days have been entered, the program should report the total number of cars sold and the total sales for the period. See example output. NOTE: duplicate the currency format shown for the total sales,

Example Output How many cars were sold on day 1? 1

Selling price of car 1? 30000

How many cars were sold on day 2? 2

Selling price of car 1? 35000

Selling price of car 2? 45000

How many cars were sold on day 3? 0

How many cars were sold on day 4? 1

Selling price of car 1? 30000

How many cars were sold on day 5? 0

You sold 4 cars for total sales of $140,000.00

In: Computer Science

Edom Company, the lessor, enters into a lease with Davis Company to lease equipment to Davis...

Edom Company, the lessor, enters into a lease with Davis Company to lease equipment to Davis beginning January 1, 2016. The lease terms, provisions, and related events are as follows:

1. The lease term is 5 years. The lease is noncancelable and requires annual rental receipts of $100,000 to be made in advance at the beginning of each year.
2. The equipment costs $313,000. The equipment has an estimated life of 6 years and, at the end of the lease term, has an unguaranteed residual value of $20,000 accruing to the benefit of Edom.
3. Davis agrees to pay all executory costs.
4. The interest rate implicit in the lease is 14%.
5. The initial direct costs are insignificant and assumed to be zero.
6. The collectibility of the rentals is reasonably assured, and there are no important uncertainties surrounding the amount of unreimbursable costs yet to be incurred by the lessor.

Required:

1. Next Level Determine if the lease is a sales-type or direct financing lease from Edom’s point of view (calculate the selling price and assume that this is also the fair value).
2. Prepare a table summarizing the lease receipts and interest revenue earned by the lessor.
3. Prepare journal entries for Edom, the lessor, for the years 2016 and 2017.
Prepare a table summarizing the lease receipts and interest revenue earned by the lessor.

Edom Company

Lease Payments Received and Interest Revenue Earned Summary

2016 - 2020

1

Date

Annual Lease Payments Received

Interest Revenue at 14% on Net Investment

Lease Receivable

Unearned Interest: Leases

Net Investment

2

January 1, 2016

3

January 1, 2016

4

December 31, 2016

5

January 1, 2017

6

December 31, 2017

7

January 1, 2018

8

December 31, 2018

9

January 1, 2019

10

December 31, 2019

11

January 1, 2020

12

December 31, 2020

General Journal

Prepare journal entries for Edom, the lessor, for the year 2016. Additional Instructions

PAGE 1

GENERAL JOURNAL

DATE ACCOUNT TITLE POST. REF. DEBIT CREDIT

1

2

3

4

5

6

7

8

9

Prepare journal entries for Edom, the lessor, for the year 2017. Additional Instructions

PAGE 1

GENERAL JOURNAL

DATE ACCOUNT TITLE POST. REF. DEBIT CREDIT

1

2

3

4

In: Accounting

A researcher took a sample of 14 students and put them into three different groups. The...

A researcher took a sample of 14 students and put them into three different groups. The three different groups are taught the same materials but using a different teaching style. The styles are either in class, hybrid, or online. The students are graded between 0 and 20 for the final grades. The individual grades by groups is shown below. The group standard deviation is also shown below. You are hired to test if teaching style has an impact on the average grade in each group. Use an alpha of .05 for this study.

In Class

Hybrid

Fully Online

Group 1

Group 2

Group 3

7

6

9

13

11

8

6

3

13

15

1

14

4

9

Standard Deviation Group 1

Standard Deviation Group 2

Standard Deviation Group 3

5

4

3

What are the null hypotheses and alternative hypotheses for the test? (2)

What are the requirements for an ANOVA test, what is the critical value for our distribution? (1)

What is the mean square between of the model? What does it measure? (2)

What is the mean square within of the model? What does it measure? (2)

What is the critical value for this distribution and what is the sample statistics for the data? (2)

Do we reject or fail to reject the null hypotheses? (1)

In: Statistics and Probability

Rock Paper Scissors Lizards Spock IN JAVASCRIPT! Purpose The purpose of this program is for students...

Rock Paper Scissors Lizards Spock

IN JAVASCRIPT!

Purpose

The purpose of this program is for students to demonstrate their understanding of selection. The program can be developed using if-statements with no logical operators. Hint: Use nested-if statements to help you construct the logic of the program.

Rules and Structure of Program

Rock Paper Scissors Lizard Spock is similar to the traditional two-player game Rock-Paper-Scissors with two additional game items to select. You will develop a program that replicates this game. The two players of the game are the user and the computer. Below is an image that defines the rules of the game.

The program starts by prompting the user to enter a number (0 - Rock, 1 - Paper, 2 - Scissors, 3 - Lizards, and 4 - Spock). The computer will randomize a number that represents one of these items. It will use the same numbering order to define the game item it selects. Include this line of code in your program to generate a random number between zero and four.

int com = (int)(Math.random() * 5); // generates a random number for the computer to represent the game item it selects

The program then compares the game item the user and computer selected and displays the winner of the game. If the computer and user select the same game item, there is no winner, and the round is a tie.

There is a likeliness that your program will not produce the same output for the first run because the computer generates a random number during each program execution. The input of your program should be identical to the sample input.

Enter a number (0 - Rock, 1 - Paper, 2 - Scissors, 3 - Lizard, 4 - Spock):

The output of your program should follow the same structure as the sample output.

The user selected [game item].
The computer selected [game item].
[game item] [action] [game item] // Only if the game items selected are different.
The [user/computer] is the winner. 

The action performed can be found in the image above that describes the rules.

Sample Input and Output

Sample Input
Enter a number (0 - Rock, 1 - Paper, 2 - Scissors, 3 - Lizard, 4 - Spock): 4

Sample Output
The user selected Spock.
The computer selected Lizard.
Lizard poisons Spock.
The computer is the winner.
Sample Input
Enter a number (0 - Rock, 1 - Paper, 2 - Scissors, 3 - Lizard, 4 - Spock): 0

Sample Output
The user selected Rock.
The computer selected Scissors.
Rock crushes Scissors.
The user is the winner.
Sample Input
Enter a number (0 - Rock, 1 - Paper, 2 - Scissors, 3 - Lizard, 4 - Spock): 2

Sample Output
The user selected Scissors.
The computer selected Lizard. 
Scissors decapitates the lizard.
The user is the winner.
Sample Input
Enter a number (0 - Rock, 1 - Paper, 2 - Scissors, 3 - Lizard, 4 - Spock): 3

Sample Output
The user selected Lizards.
The computer selected Lizards.
There is no winner.

In: Computer Science

CorrelationSPSS Lab A researcher was interesting in the relationship between motivation and depression. She collected data...

CorrelationSPSS Lab

A researcher was interesting in the relationship between motivation and depression. She collected data from 10 participants. All participants completed a standardized motivation questionnaire and depression scale.  The data are in the table below.

Participant

Motivation Score

Depression Score

1

9

4

2

4

7

3

8

4

4

3

8

5

8

4

6

2

8

7

8

3

8

8

4

9

8

3

10

3

8

                                                                                                                    

Select and compute the appropriate statistical test in SPSS.  

1. Open a new data page in SPSS

2. In data view, copy and paste the values from the table (only the motivation and depression scores).

3. Go to variable view and change the column names from VAR000001 and VAR000002 to Motivation and Depression, respectively.

4. Make sure the type says numeric.

5. Go back to data view.

6. Select:

Analyze

Correlate

Bivariate

7. Move both depression and motivation over to the variable pane.

8. Make sure Pearson and two-tailed are selected

9. Got to options. Select means and standard deviations and click continue.

10. Click ok. An output window should appear.

11. The output for the correlation is a matrix. The top left corner is Motivation. If you move to the right there should be a 1.  That is showing that motivation is perfectly correlated with itself, r(8) = 1.00, p< 0.001.

12. Now look at the next part of the matrix to the right.   The number should be-0.967. This is the correlation coefficient for our two variables. Also, please note the Sig. level (this is the p value), and N (the number of pairs).

.  What are the means and standard deviations for the variables.

2. What is the correlation coefficient.

3. What is the pvalue. Is it significant?

4. What are the df for this analysis?  (Hint: df = (N – 2))

5.  Explain in words what this correlation means.

6. Write a conclusion in APA style. Please include the means (sd) and describe the relationship. Include the statistic at the end of the sentence (like the example I gave above with motivation correlated with itself).

In: Statistics and Probability

1. Consider the following reaction: 2NO2 + F2  2NO2F Calculate the average rate of formation of NO2F

 

1. Consider the following reaction: 2NO2 + F2  2NO2F Calculate the average rate of formation of NO2F (Δ[NO2F]/Δt) between 410.5 seconds and 679.2 seconds after mixing of the reactants given the following information. (Sample Exercise 13.2) (3 pts) Time [F2] 410.5 s 1.79 x 10-2 M 679.2 s 9.73 x 10-3 M

2. Consider the following generic reaction: 2A + B + C  2D + 3E From the following initial rate determinations, write the rate law for the reaction, determine the overall order for the reaction and calculate the rate constant, k. (Sample exercise 13.3) (7 pts) Initial rate [A] [B] [C] 1.27 x 10-4 M s-1 0.0125 M 0.0125 M 0.0125 M 2.56 x 10-4 M s-1 0.0250 M 0.0125 M 0.0125 M 1.27 x 10-4 M s-1 0.0125 M 0.0250 M 0.0125 M 5.06 x 10-4 M s-1 0.0125 M 0.0125 M 0.0250 M

3. Consider the following reaction and its rate law: 2N2O5  4NO2 + O2; rate = k[N2O5] At 25oC, the half-life for this reaction is 96.3 minutes; calculate the initial N2O5 concentration, [N2O5]o, if [N2O5] = 1.80 x 10-2 M after 60.0 minutes when the reaction proceeds at 25oC.

In: Chemistry