Questions
write a java programming using 2D arrey. The Lo Shu Magic Square is a grid with...

write a java programming using 2D arrey.
The Lo Shu Magic Square is a grid with 3 rows and 3 columns. The Lo Shu Magic Square has the following properties:

The grid contains the numbers 1 through 9 (each number only once)

The sum of each row, each column and each diagonal are the same

In a program you can simulate a magic square using a two-dimensional array. Write a method that accepts a two-dimensional array as an argument, and determines whether the array is a Lo Shu Magic Square. Test the function in a program.

Detailed Description:

In main create two arrays:

// Create a magic two-dimensional array.

      int[][] magicArray = { {4, 9, 2},

                             {3, 5, 7},

                             {8, 1, 6} };

      // Create a normal two-dimensional array.

      int[][] normalArray = { {1, 2, 3},

                              {4, 5, 6},

                              {7, 8, 8} };

For the normalArray call showArray and then showResult. Then do the same for magicArray

showArray accepts a two-dimensional array and prints it row by row

showResult call isMagicSquare with the two-dimensional array reference as the parameter. It prints a message based on the return value which is Boolean.

The isMagicSquare method accepts a two-dimensional int array as an argument, and returns true if the array meets all the requirements of a magic square. Otherwise it returns false. You can create separate methods to checkRange (all must be from 1-9), checkUnique (see if all values are unique), checkRowSum, checkColSum, checkDiagSum. If each of these 3 return true then it is a Magic Square.

Output should be

1 2 3

4 5 6

7 8 8

This is not a Lo Shu magic square.

4 9 2

3 5 7

8 1 6

This is a Lo Shu magic square.

In: Computer Science

Student # Gender Height Shoe Age Hand 1 F 68 8.5 20 R 2 F 60...

Student #

Gender

Height

Shoe

Age

Hand

1

F

68

8.5

20

R

2

F

60

5.5

27

R

3

F

64

7

31

R

4

F

67

7.5

19

R

5

F

65

8

20

R

6

F

66

9

29

R

7

F

62

9.5

30

L

8

F

63

8.5

18

R

9

F

60

5

19

L

10

F

63

7.5

42

R

11

F

61

7

20

R

12

F

64

7.5

17

R

13

F

65

8

19

R

14

F

68

8

19

R

15

F

63

7.5

18

R

16

F

62

7.5

19

R

17

F

64

7

23

R

18

F

72

11

28

R

19

F

62

8

20

R

20

F

59

6.5

29

R

21

F

64

8.5

19

R

22

F

68

9.5

23

R

23

F

65

9.5

34

R

24

F

63

8

27

R

25

F

65

8

23

R

26

F

62

7.5

30

R

27

F

67

7.5

31

L

28

F

66

9

37

R

29

F

61

6

24

R

30

F

61

6.5

46

R

31

F

68

8

20

R

32

F

63

7.5

42

R

33

F

63

5.5

33

R

34

F

58

5

20

R

35

F

65

8

44

R

36

F

69

9

28

R

37

F

68

9

20

R

38

F

63

7

49

R

39

F

62

6.5

19

R

40

F

66

7.5

19

R

41

F

69

7.5

55

R

42

F

69

11

40

R

43

F

63

6.5

19

R

44

F

61

7.5

20

R

45

F

68

9

19

R

46

F

65

9

25

R

47

F

62

7

31

R

2. Using the SCC men’s/women’s class sample data at the ?=0.05, is there enough evidence to conclude that there is a significant linear correlation between men’s/women’s height and men’s/women’s shoe size?

a. State the null and alternate hypotheses.

b. Specify the level of significance.

c. State the correlation coefficient. (3 decimal places)

d. State the critical value from Table 11. (Use the value of n that is closest to your sample size.)

e. State whether to “reject the ?0” or “fail to reject the ?0”.

f. Interpret the decision in the context of the original claim

In: Statistics and Probability

Find the 25th, 50th, and 75th percentile from the following list of 32 data 1 3...

Find the 25th, 50th, and 75th percentile from the following list of 32 data

1 3 7 9 12
13 16 19 23 29
31 39 43 44 45
48 50 59 61 65
66 67 68 73 74
81 83 89 92 93
97 100

In: Statistics and Probability

Match the terms with their definitions. Paired sample T test, Inferential statistics, descriptive statistics, Non-parametic inferential...

Match the terms with their definitions.

Paired sample T test, Inferential statistics, descriptive statistics, Non-parametic inferential statistical procedures, Chi-square, Correlation, Independant-samples T test, Parametric inferential statistical procedures

1) This parametric statistical procedure is used when you have a dependent variable that is interval (1, 2, 3, 4, .....and so on), and an independent variable that is dichotomous (1=yes, 2=no for example). This tests compares the means (averages) of two samples and tells you if there are statistically significant differences between the two samples.

2) This statistical test determines the strength of a linear relationship between two variables. It measures the degree of relatedness and the direction of the relationship. It is a measure of "effect size" (effect size is from chp 21)

3) This parametric statistical procedure is used when you have scores from two points in time (pre-test and post-test), and the dependent variable is interval level. this test indicates whether there is a statistically significant difference in mean (average) scores between time 1 (pretest) and time 2 (posttest)).

4) When you can assume that a variable is normally distributed in a population and the dependent variable of interest is an interval level variable (measured continuously with one meaning one and two meaning two etc.) these types of statistical tests are used

5) These are used when you are using a sample to test a hypothesis about a population.

6) This non-parametric statistical procedure is used when you have a dependent variable that is either dichotomous, categorical, or ordinal and an independent variable that is dichotomous, categorical or ordinal. The results tell you whether the observed sample data is the same as what you would expect (the expected data), if the two variables are not associated.

7) When you cannot assume that a variable is normally distributed in a population and the dependent variable of interest is not an interval level variable but rather a dichotomous (ie 1=yes or 2=no; 1=male or 2=female), categorical (ie1=cats, 2=dogs, 3=birds), or ordinal (ie 1=never, 2=sometimes, 3=often, 4=always) with the numbers only used to represent categories, these types of statistical tests are used

8) The procedures used to describe and summarize data

In: Psychology

(a) Food Dragon and Delivery Woo are two main food delivery companies in Hong Kong. Suppose...

(a) Food Dragon and Delivery Woo are two main food delivery companies in Hong Kong. Suppose the delivery time of these two companies both follow a normal distribution. A random sample of size 10 is selected from each of the food deliveries.

Sample Size mean(mins) standard deviation(mins)

Food Dragon 10 20 5

Delivery Woo 10 15   6

Assuming the delivery times of both companies are normal with equal variances, find the 90% confidence interval for the difference between the mean delivery time of Food Dragon and Delivery Woo. [8marks]

(b) A random sample of 1000 citizens from Macau have been tested for the anti-body for the coronavirus. It was found that 150 of these citizens has the anti-body for the coronavirus. Find a 93% confidence interval for the true population proportion of citizens in the Macau with the anti-body. [5 marks]

(c) An engineer wants to find out the concentration of carbon monoxide (µg/m3 ) emitted by a newly invented car. The engineer collected 14 observations in a randomly chosen period.

68, 54, 32, 80, 50, 40, 60, 60, 55, 40, 42, 50, 60, 43

Construct a 95% confidence interval for the mean concentration of carbon monoxide. Assume that the concentrations of CO are normally distributed. [7 marks]

In: Statistics and Probability

At the end of the year, a company offered to buy 4,450 units of a product...

At the end of the year, a company offered to buy 4,450 units of a product from X Company for a special price of $11.00 each instead of the company's regular price of $17.00 each. The following information relates to the 62,400 units of the product that X Company made and sold to its regular customers during the year:

Per-Unit Total     
Cost of goods sold $7.80    $486,720   
Period costs 2.74    170,976   
Total $10.54    $657,696   


Fixed cost of goods sold for the year were $142,272, and fixed period costs were $83,616. Variable period costs include selling commissions equal to 3% of revenue.

6. Profit on the special order is


7. Assume the following two changes for the special order: 1) variable cost of goods sold will decrease by $0.78 per unit, and 2) there will be no selling commissions. What would be the effect of these two changes on the special order profit?


8. There is concern that regular customers will find out about the special order, and X Company's regular sales will fall by 950 units. As a result of these lost sales, X Company's profits would fall by

In: Accounting

Student What is your height in inches? What is your weight in pounds? What is your...

Student What is your height in inches? What is your weight in pounds? What is your cumulative Grade Point Average (GPA) at FTCC or your primary college? How many hours do you sleep each night?
1 67 100 4 7
2 62 105 4 5
3 72 120 4 8
4 61 125 4 7
5 56 105 3.7 6
6 61 120 4 7
7 65 172 3.8 7
8 72 235 3.22 5
9 63 135 4 6
10 71 182 3.62 6
11 70 172 4 6
12 72 160 2.3 8
13 67 135 4 8
14 64 128 7
15 72 180 2.5 8
16 70 170 4 6
17 63 210 3.75 4
18 68 180 2.2 7
19 72 250 3.69 6
20 76 210 1.98 6
21 63 144 6
22 68 165 2.5 6
23 64 140 3.7 9
24 69 145 3 5
25 72 270 2.5 7
26 63 132 4 7
27 63 148 3.231 5
28 72 185 3.5 6
29 69 175 4 6
30 59 155 3.6 7
31 69 179 4 8
32 62 205 3.5 6
33 63.5 180 3.7 5
34 68 240 4 5
35 62 168 3.3 7
36 67 137 3.2 8
37 70 200 4 6
38 69 186 4 5
39 60 140 4 5
40 70 199 3.8 5
41 65 205 2.5 10
42 65 145 3.2 8
43 72 180 2.1 6
44 74 175 3.5 7
45 67 140 3.7 6
46 70 215 3 8
47 67 205 2.8 6
48 68 191 3.51 8
49 71 213 1.4 4
50 71 225 2.7 6
51 70 217 3.8 6
52 67.2 150 4 6
53 71 190 1.7 8
54 76 220 3.7 7
55 68 189 3.5 8

Part 3:

In Module 3, we looked at the hours of sleep that FTCC students get each night. I found online that the average hours of sleep that an adult gets is 6.8 hours. Does this seem likely based on our sample of students? You should show all work supporting this claim and write a paragraph explaining your decision.

You can use Intervals or Hypothesis testing to prove or disprove this claim. You will choose the confidence level or significance level.

Show all steps in the chosen process.

If you do a hypothesis test, include the claim, hypothesis, significance level, so on…

If you do an interval, give confidence level, margin of error, so on…

Explain your reasoning in detail. Why do you think that the average is 6.8 hours or not 6.8 hours? Back up your opinion using the statistical information.

You should write one paragraph explaining the results of your statistical process.

In: Statistics and Probability

Student What is your height in inches? What is your weight in pounds? What is your...

Student What is your height in inches? What is your weight in pounds? What is your cumulative Grade Point Average (GPA) at FTCC or your primary college? How many hours do you sleep each night?
1 67 100 4 7
2 62 105 4 5
3 72 120 4 8
4 61 125 4 7
5 56 105 3.7 6
6 61 120 4 7
7 65 172 3.8 7
8 72 235 3.22 5
9 63 135 4 6
10 71 182 3.62 6
11 70 172 4 6
12 72 160 2.3 8
13 67 135 4 8
14 64 128 7
15 72 180 2.5 8
16 70 170 4 6
17 63 210 3.75 4
18 68 180 2.2 7
19 72 250 3.69 6
20 76 210 1.98 6
21 63 144 6
22 68 165 2.5 6
23 64 140 3.7 9
24 69 145 3 5
25 72 270 2.5 7
26 63 132 4 7
27 63 148 3.231 5
28 72 185 3.5 6
29 69 175 4 6
30 59 155 3.6 7
31 69 179 4 8
32 62 205 3.5 6
33 63.5 180 3.7 5
34 68 240 4 5
35 62 168 3.3 7
36 67 137 3.2 8
37 70 200 4 6
38 69 186 4 5
39 60 140 4 5
40 70 199 3.8 5
41 65 205 2.5 10
42 65 145 3.2 8
43 72 180 2.1 6
44 74 175 3.5 7
45 67 140 3.7 6
46 70 215 3 8
47 67 205 2.8 6
48 68 191 3.51 8
49 71 213 1.4 4
50 71 225 2.7 6
51 70 217 3.8 6
52 67.2 150 4 6
53 71 190 1.7 8
54 76 220 3.7 7
55 68 189 3.5 8

Part 4:

In Module 3, we looked at the GPAs of FTCC students. I found online source that claims the average GPA of college students in the US is 3.11. Does this seem likely based on our sample of students? You should show all work supporting this claim and write a paragraph explaining your decision.

You can use Intervals or Hypothesis testing to prove or disprove this claim. You will choose the confidence level or significance level.

Show all steps in the chosen process.

If you do a hypothesis test, include the claim, hypothesis, significance level, so on…

If you do an interval, give confidence level, margin of error, so on…

Explain your reasoning in detail. Why do you think that the average GPA is 3.11 or is not 3.11? Back up your opinion using the statistical information.

You should write one paragraph explaining the results of your statistical process.

In: Statistics and Probability

The finance manager for Widget Inc. would like to analyze the following sales data for Widget...

  1. The finance manager for Widget Inc. would like to analyze the following sales data for Widget Inc.in 2012.  

39

35

84

68

72

52

46

60

50

55

60

57

55

56

73

74

78

63

70

49

56

91

57

54

50

41

59

57

62

59

44

79

62

57

51

85

67

69

52

85

49

66

56

60

56

46

64

60

  1. Calculate two statistics that measure variability.  What do these statistics tell us about the data?
  2. Calculate two statistics that measure central tendency.  What do these statistics tell us about the data?
  3. Create a frequency distribution of the sales data.  (Include all five columns in your frequency distribution).
  4. Find the 80th percentile.  What does this number represent?

In: Statistics and Probability

1. Frank Rizzo is considering two investment  options with seven-year lives. Option one pays $250 every quarter,...

1. Frank Rizzo is considering two investment  options with seven-year lives. Option one pays $250 every quarter, the other pays $500 semi-annually. The option with the better value would be:
A. $250 every quarter.
B. Both options are equally attractive.
C. $500 semi-annually.

2. Darius Rucker is leaving Theta Tech after several years. During his time at Theta he accumulated a deferred payroll benefit.  He must choose between a lump-sum distribution or annual payments over the next 10 years, with his first payment deposited today. He believes he can invest any sum received at 5.15% for the next ten years. The annual payments are  $12,500 and the lump-sum distribution is $105,000. To the nearest dollar, the more valuable choice is:
A. The annual payments.
B. The lump-sum distribution.
C. Both choices have the same value.

In: Finance