For each given integer n, determine if n is a sum of two
squares. (You do not have to find the squares.)
(a)n= 19
(b)n= 45
(c)n= 99
(d)n= 999
(e)n=1000
1)With two-way ANOVA, the total sum of squares is portioned in
the sum of squares for _______.
2) A _______ represents the number of data values assigned to
each cell in a two-way ANOVA table. a)cell b) Block c)replication
D)level
3.) True or false: In a two-way ANOVA procedure, the results
of the hypothesis test for Factor A and Factor B are only reliable
when the hypothesis test for the interaction of Factors A and B is
statistically insignificant.
4.)Randomized...
Statement:
For a given integer N, print all the squares of positive
integers where the square is less than or equal to N, in ascending
order.
Programming Tasks:
Prompt the user to input the value of N
Output to the screen all squares of positive integers <=
N
Tests:
Item
Test 1
Test 2
Test 3
Inputs:
50
9
100
Outputs:
1 4 9 16 25 36 49
1 4 9
1 4 9 16 25 36 49 64 81...
Envision an algorithm that when given any positive integer n, it
will print out the sum of the squares from 1 to n.
E.g. given 4 the algorithm would print 30 (because 1 + 4 + 9 +
16 = 30) You can use multiplication denoted as * in your solution
and you do not have to define it (e.g. 2*2=4)
Write pseudocode for this algorithm using iteration
(looping).
Create a flow chart
Implement solution from flowchart in Python at...
Consider the following recursive algorithm for computing the sum
of the first n squares: S(n) = 12 +22 +32 +...+n2 . Algorithm S(n)
//Input: A positive integer n //Output: The sum of the first n
squares if n = 1 return 1 else return S(n − 1) + n* n a. Set up and
solve a recurrence relation for the number of times the algorithm’s
basic operation is executed. b. How does this algorithm compare
with the straightforward non-recursive algorithm...
Three Patterns Given two numbers N and K, output three squares
with the size N × N each with their own set of rules:
• The first square is made entirely using the ‘#’ symbol.
• The second square is made using the ‘.’ symbol except for
every K rows use the ‘#’ symbol instead. • The third square is made
using the ‘.’ symbol except for every K columns use the ‘#’ symbol
instead.
Also print new line (\n)...
There are at most two squares (not necessarily with the same
size) such that the sum of the area(s) is 8 in^2 . Maximize and
minimize the sum of the perimeter(s)?
You are given an ANOVA table below with some missing
entries.
Source
Variation
Sum
of Squares
Degrees
of Freedom
Mean
Square
F
Between Treatments
3
1198.8
Between Blocks
5040
6
840
Error
5994
18
Total
27
a.
State the null and alternative hypotheses.
b.
Compute the sum of squares due to treatments.
c.
Compute the mean square due to error.
d.
Compute the total sum of squares.
e.
Compute the test statistic F.
f.
Test the null hypothesis stated...
Write a method sumTo that accepts an integer parameter n and
returns the sum of the first n reciprocals.
In other words: sumTo(n) returns: 1 + 1/2 + 1/3 + 1/4 + ... +
1/n
For example, the call of sumTo(2) should return 1.5. The method
should return 0.0 if passed the value 0 and should print an error
message and return -1 if passed a value less than 0.
Include a loop.
Please help for Java programming.