Questions
A car dealer believes that average daily sales for four different dealerships in four separate states...

  1. A car dealer believes that average daily sales for four different dealerships in four separate states are equal. A random sample of days results in the following data on daily sales:

Ohio                New York       West Virginia              Pennsylvania

               3                          10                         3                                  20

               2                            0                         4                                  11

               6                            7                         5                                  8

               4                            8                                                             2

               4                            0                                                             14

               7

               2

Use ANOVA to test this claim at the 0.05 level.

  1. Use Excel to support your answers to Question 1. Submit your completed Excel spreadsheet.

  1. Suppose we have the following data on variable X (independent) and variable Y (dependent):

X         Y

2          70

0          70

4          130

  1. By hand, determine the simple regression equation relating Y and X.
  1. Calculate the R-Square measure and interpret the result.
  1. Calculate the adjusted R-Square.
  1. Test to see whether X and Y are significantly related using a test on the population correlation. Test this at the 0.05 level.
  1. Test to see whether X and Y are significantly related using a t-test on the slope of X. Test this at the 0.05 level.
  1. Test to see whether X and Y are significantly related using an F-test on the slope of X. Test this at the 0.05 level.
  1. Suppose we have the following values for a dependent variable, Y, and three independent variables, X1, X2, and X3. The variable X3 is a dummy variable where 1 = male and 2 = female:

X1       X2       X3       Y

0          40        1          30

0          50        0          10

2          20        0          40

2          50        1          50

4          90        0          60

4          60        0          70

4          70        1          80

4          40        1          90

6          40        0          70

6          50        1          90

8          80        1          100

9          90        0          80

9          20        1          150

  1. Run the multiple regression in Excel and provide the resulting multiple regression equation.
  2. Provide the R-Square measure. Is this a good regression model? Explain. Use a level of significance of 0.05 in any tests you consider.
  1. Which variables are important in explaining Y when the level of significance is 0.05? Is the dummy variable important at this level of significance? Discuss what the coefficients mean regarding the effect of each variable on Y.
  1. Suppose a female with X1 = 5 and X2 = 80 is selecte What would be her predicted value of Y?
  1. What types of problems might exist in this multiple regression?

In: Statistics and Probability

Java questions. Please answer everything. It mean the world to me. Thank you very much Identify...

Java questions. Please answer everything. It mean the world to me. Thank you very much

  1. Identify the errors in the following code fragment:
    1: ArrayList<String> list = new ArrayList<String>();
    2: list.add( "Denver" );
    3: list.add( "Austin" );
    4: list.add( new java.util.Date() );
    5: String city = list.get( 0 );
    6: list.set( 2, "Dallas" );
    7: System.out.println( list.get(2) );
  2. Explain why the following code fragment displays [1, 3] rather than [2, 3].
    1: ArrayList<Integer> list = new ArrayList<Integer>();
    2: list.add(1);
    3: list.add(2);
    4: list.add(3);
    5: list.remove(1);
    6: System.out.println( list );
  3. Describe the difference between passing a parameter of a primitive type and passing a parameter of a reference type. Then show the output of the following program:
     1: class Test {
     2:     public static void main ( String [] args ) {
     3:         Count myCount = new Count();
     4:         int times = 0;
     5:         for ( int i = 0; i < 100; i++ )
     6:             increment( myCount, times );
     7:         System.out.println( "count is " + myCount.count );
     8:         System.out.println( "times is " + times );
     9:     }
    10:     public static void increment ( Count c, int times ) {
    11:         c.count++;
    12:         times++;
    13:     }
    14: }
    15: 
    16: class Count {
    17:     public int count;
    18:     public Count ( int c ) {
    19:         count = c;
    20:     }
    21:     public Count () {
    22:         count = 1;
    23:     }
    24: }
  4. What is wrong in the following code?
    1: public class Test {
    2:    public static void main ( String [] args ) {
    3:       java.util.Date[] dates = new java.util.Date[10];
    4:       System.out.println( dates[0] );
    5:       System.out.println( dates[0].toString() );
    6:    }
    7: }
  5. If a class contains only private data fields and no “set” methods, is the class considered to be immutable?
  6. If a class contains only data fields that are both private and primitive, and no “set” methods, is the class considered to be immutable?
  7. What is wrong in the following code?
     1: public class C {
     2:     private int p;
     3: 
     4:     public C () {
     5:         System.out.println( "C's no-arg constructor invoked" );
     6:         this(0);
     7:     }
     8: 
     9:     public C ( int p ) {
    10:         p = p;
    11:     }
    12: 
    13:     public void setP ( int p ) {
    14:         p = p;
    15:     }
    16: }
  8. What is wrong in the following code?
    1: public class Test {
    2:     private int id;
    3:     public void m1 () {
    4:         this.id = 45;
    5:     }
    6:     public void m2 () {
    7:         Test.id = 45;
    8:     }
    9: }

In: Computer Science

Factor the following polynomials as a product of irreducible in the given polynomial ring. A. p(x)=2x^2+3x-2...

Factor the following polynomials as a product of irreducible in the given polynomial ring.

A. p(x)=2x^2+3x-2 in Q[x]

B. p(x)=x^4-9 in Q[x]

C. p(x)=x^4-9in R[x]

D. p(x)=x^4-9in C[x]

E. f(x)=x^2+x+1 in R[x]

F. f(x)=x^2+x+1in C[x]

In: Advanced Math

Edison Leasing leased high-tech electronic equipment to Manufacturers Southern on January 1, 2018. Edison purchased the...

Edison Leasing leased high-tech electronic equipment to Manufacturers Southern on January 1, 2018. Edison purchased the equipment from International Machines at a cost of $139,107. (FV of $1, PV of $1, FVA of $1, PVA of $1, FVAD of $1 and PVAD of $1) (Use appropriate factor(s) from the tables provided.)

Related Information:
Lease term 2 years (8 quarterly periods)
Quarterly rental payments $18,000 at the beginning of each period
Economic life of asset 2 years
Fair value of asset $139,107
Implicit interest rate 4%
(Also lessee’s incremental borrowing rate)

Prepare a lease amortization schedule and appropriate entries for Edison Leasing from the beginning of the lease through January 1, 2019. Edison’s fiscal year ends December 31.

1. 1/1/2018 Record the lease.

2. 1/1/2018 Record cash received

3. 4/1/2018 Record cash received.

4. 7/1/2018 Record cash received.

5. 10/1/2018 Record cash received.

6. 12/31/2018 Record interest receivable.

7. 1/1/2019 Record cash received.

In: Accounting

The Problem Below are a series of problems you need to solve using recursive functions. You...

The Problem

Below are a series of problems you need to solve using recursive functions. You will write a program that will read commands from an input file, with each command referring to one of the recursive problems to be executed. Each command will be followed (on the same line of input) by the respective parameters required for that problem.

Implementation

Each recursive function MUST have a wrapper function enclosing it where you will do input/output file processing as well as calling the actual recursive function. From Wikipedia, “A wrapper function is a function in a computer program whose main purpose is to call a second function”.   As an example, here is one of the wrapper functions you will use:

     void KnightsFlip(FILE *fin, FILE *fout);

This would be the wrapper function for one of the recursive problems, called KnightsFlip (described, in detail, below). These wrapper functions will simply do three things:

  1. deal with the processing of the input file
  2. most importantly, the wrapper function will make the initial call to your recursive function that will actually solve the problem.
  3. Finally, the wrapper functions will print to the output file. Note: printing to the output file may also occur in the actual recursive functions.

Of course, at your own discretion (meaning, your own choice), you can make auxiliary functions for your recursive functions to use, such as functions to swap values in an array, take the sum of an array of values, printing functions, etc.

Five Problems to Solve Using Recursion:

(1) KnightsMultiply

Write a recursive function that multiplies all values from k up to n and returns the result (as a double). For example: if k = 5, and n = 10, then multiply 5 * 6 * 7 * 8 * 9 * 10 to return 151200.

(2) KnightsFlip

You have an index card with the letter K written on one side, and F on the other. You want to see ALL of the possible ways the card will land if you drop it n times. Write a recursive function that prints each session of dropping the cards with K's and F's.   For example of you drop it 4 times in a given session, all possible ways to drop it are as follows:

KKKK

KKKF

KKFK

KKFF

KFKK

KFKF

KFFK

KFFF

FKKK

FKKF

FKFK

FKFF

FFKK

FFKF

FFFK

FFFF

*Note: The possible ways would have to print in this specific order.

(3) KnightsShape

Simply write a recursive function that prints a large X composed of smaller X's with a given “width”, n, which is guaranteed to be odd. Example for an X of width n = 7:

X     X

X   X   X X

   X

X X

X   X

X     X

*Note: to be clear, the “width” is the length (number) of X’s along one line of the large X.

(4) KnightsScotch

No, this has nothing to do with drinking Scotch! Suppose you are playing a special game of hopscotch on a line of integer numbers drawn on the ground like so:

            4 4 1 5 2 6 3 4 2 0

The number, with a square around it, indicates where you are currently standing. You can move left or right down the line by jumping the number of spaces indicated by the number you are standing on. So if you are standing on a 4, you can jump either left 4 spaces or right 4 spaces. You cannot jump past either end of the line.

For example, the first number (4) only allows you to jump right, since there are no numbers to the left that you can jump to.

The goal: you want to get to the 0 at the far end (right side) of the line. You are also guaranteed that there will be only one zero, which, again, will be at the far right side.

Here is how you do that with the above line:

Starting           4 4 1 5 2 6 3 4 2 0 position

Step 1:               4 4 1 5 2 6 3 4 2 0

Jump right

Step 2:               4 4 1 5 2 6 3 4 2 0

Jump left

Step 3:               4 4 1 5 2 6 3 4 2 0

Jump right

Step 4:               4 4 1 5 2 6 3 4 2 0

Jump right

Step 5:               4 4 1 5 2 6 3 4 2 0

Jump left

Step 6:               4 4 1 5 2 6 3 4 2 0

Jump right

Some KnightsScotch lines have multiple paths to 0 from the given starting point. Other lines have no paths to 0, such as the following:

3 1 2 3 0

In this line, you can jump between the 3's, but not anywhere else.

You are to write a recursive function that returns an integer 1 (for solvable) or 0 (for not solvable), indicating if you are able to get to the rightmost 0 or not.

(5) KnightsDepot

You are working on an engineering project with other students and are in need of 2x4s (2 by 4’s) of various lengths. Thankfully, UCF has its very own “Depot” store: KnightsDepot…so you don’t have to drive far. Unfortunately, KnightsDepot only carries 2x4s in fixed lengths. So your team will have to purchase the 2x4s and then cut them as needed. Because of your tight college student budget, you want to buy the least number of 2x4s in order to cover the lengths requested by your team.

The recursive function you are designing will return the minimum number of 2x4s you need to purchase, in order to cover the lengths requested by your team. Example:

Array of 2x4 lengths requested by your team: { 6, 4, 3, 4, 1, 3 }

Fixed length of 2x4s at KnightsDepot: 6 (so each purchased 2x4 has a length of 6)

A possible arrangement of of 2x4s: { 6 } { 3, 3 } { 4, 1 } { 4 }

Minimum number of 2x4s needed to purchase: 4

Wrapper Functions

As mentioned, you MUST use the following five wrapper functions EXACTLY as shown:

     void KnightsMultiply(FILE *fin, FILE *fout); void KnightsFlip(FILE *fin, FILE *fout); void KnightsShape(FILE *fin, FILE *fout); void KnightsScotch(FILE *fin, FILE *fout); void KnightsDepot(FILE *fin, FILE *fout);

Input File Specifications

You will read in input from a file, "KnightsRecurse.in". Have this AUTOMATED. Do not ask the user to enter “KnightsRecurse.in”. You should read in this automatically (this will expedite the grading process). The file will contain an arbitrary number of lines and on each line there will be a command. Each command will be followed by relevant data as described below (and this relevant data will be on the same line as the command).

We will not tell you the number of commands in the file. So how do you know when you’ve read all the commands in the input file? You can use the <stdlib.h> function feof(FILE * file) to determine if you have reached the end of the file.

The commands (for the five recursive functions), and their relevant data, are described below:

KnightsMultiply - This command will be followed by the following information: k and then n, as described above.

KnightsFlip - This command will be followed by a single integer, n, as described above.

KnightsShape - This command will be followed by a single integer, n, as described above.

KnightsScotch - This command will be followed by an integer, start, representing the initial position on the line you are playing on (0 means the far left, the first position); size, the number of integers drawn on the ground; size will be followed by size number of integers, the integers drawn on the ground. (see input file for examples)

KnightsDepot - This command will be followed by an integer maxlen, which represents the maximum 2x4 length the store sells; size, the number of 2x4s your team needs; size will be followed by size number of integers, the length of each 2x4 your team needs. It is guaranteed that the requested lengths will all be less than or equal to the maxlen sold by the store.

In: Computer Science

A study by Staub, 1970, was concerned with the effects of instructions to young children and...

A study by Staub, 1970, was concerned with the effects of instructions to young children and their subsequent attempts to help another child (apparently) in distress. Twenty-four first-grade students were randomly assigned to one of three groups. The first group was labeled as indirect responsibility (IR). Students in the IR group were informed that another child was alone in an adjoining room and had been warned not to climb up on a chair. The second group was labeled direct responsibility one (DR1). Students in the DR1 group were told the same story as in the IR condition, but was also told that they were left in charge and to take care of anything that happened. The students were given a simple task, and the researcher left the room. The students then heard a loud crash in the adjoining room followed by a minute of sobbing and crying. Students in the third group, direct responsibility two (DR2), had the same instructions as the DR1 group, but the sounds of distress also included calls for help. Ratings from 1 (no help) to 5 (went to the adjoining room) were given to each student by an observer sitting behind a one-way mirror. The ratings are given below.

1. Perform a one-way ANOVA in SPSS with α = .05 and answer the following questions.

IR

DR1

DR2

3

5

4

4

4

4

2

5

3

1

4

3

1

5

4

2

5

2

1

4

5

1

3

3

PART A: The ANOVA is based on three assumptions. Describe the three assumptions in detail.

PART B: State the null hypothesis in words.

In: Statistics and Probability

You are operating a mutual fund which today has $100mil in assets. Your returns and fund...

You are operating a mutual fund which today has $100mil in assets. Your returns and fund flows into/out of the fund are listed below.

Time =

Return

Fund Flow $Mil

1

20.00%

5

2

10.00%

3

3

-30.00%

-10

4

10.00%

4

5

-5.00%

-2

Question 1: What is the arithmetic average (mean) of the returns?

Question 2: What is the geometric average (mean) of the returns?

Question 3: What is the dollar-weighted average (mean) of the returns?

In: Finance

Assume that the prices of L and M are $6 and $2, respectively,

Answer the question on the basis of the following total utility data for products L and M. Assume that the prices of L and M are $6 and $2, respectively, and that the consumer's income is $22 Units of L Total Utility Units of M Total Utility 1 9 1 16 2 15 2 28 3 18 3 36 4 20 4 40 5 21 5 42 How many units of the two products will the rational consumer purchase?

In: Economics

2 Optimization Use fminsearch to solve the following unconstrained optimization problem. min x∈R4 f(x) = (x1...

2 Optimization

Use fminsearch to solve the following unconstrained optimization problem. min x∈R4 f(x) = (x1 + 10x2)^2 + 5(x3 − x4)^2 + (x2 − 2x3)^4 + 10(x1 − x4)^4

Use the following as initial guess x0 = [3 -1 0 1] (x0 us a column not a row)

What is the minimizer you find, and what is the value of the objective function f(x) at that point?

Also, report the number of iterations taken to converge.

In: Advanced Math

5a. Write the equation of the polynomial with leading coefficient 3 that has degree 4, with...

5a. Write the equation of the polynomial with leading coefficient 3 that has degree 4, with x-intercepts at -2 and 1, both having a multiplicity of 2.

b. Write the equation of the polynomial which goes through the following points. (-2,0),(-1,0),(5,0), and (0,10).

c. (1+i) is a zero of f(x)=x^4 - 2x^3 - x^2+ 6x - 6. Find the other zeros

Please show all the work. Expert and correct answers only.

In: Math