a) i) Suppose H0: "\\mu" = "\\mu" 0 is rejected in favour of H1 : "\\mu" != "\\mu" 0 at "\\alpha" = 0.05 level of significance. Would H0 necessarily be rejected at the "\\alpha" = 0.01 level of signicance? Explain.
ii) Suppose H0: "\\mu" = "\\mu" 0 is rejected in favour of H1 : "\\mu" != "\\mu" 0 at "\\alpha" = 0.01 level of signficance. Would H0 necessarily be rejected at the "\\alpha" = 0.05 level of significance? Explain.
iii) If H0: "\\mu" = "\\mu" 0 is rejected in favour of H0: "\\mu" > "\\mu" 0, will it necessarily be rejected in favour of H1 : "\\mu" != "\\mu" 0 ? Assume that "\\alpha" remains the same.
what is the maximum mass of H2O that can be produced by combining 57.1 g of each reactant in the equation 4NH3(g)+5O2(g)=4NO(g)+6H2O(g)
You are living off-campus and drive your car to ODU campus everyday of a week. You wonder how many mileages you travel in a week (just to campus and back home) and how much you need to pay for the gas. You log your travel mileage every day during a week (just to campus and back home). This information has been saved in an input file called “mileage.txt”.
Design an algorithm and write a C++ program to do the following:
a) Find the appropriate rejection regions for the large-sample z-test in these cases:
i) A right-tailed test with "\\alpha" = 0.01;
ii) A two-tailed test at 5% signicance level;
iii) A left-tailed test with "\\alpha" = 0.05.
b) Find the p-value for the following large-sample z-tests:
i) A right-tailed test with observed z = 1.15;
ii) A two-tailed test with observed z = -2.78;
iii) A left-tailed test with observed z = -1.81.
c) Suppose that an allergist wishes to test the hypothesis that at least
30% of the public is allergic to some cheese products. Explain how the
allergist could commit:
i) a type I error.
ii) a type II error.
d) A large manufacturing firm is being charged with discrimination in its
hiring practices.
i) What hypothesis is being tested if a jury commits type I error by
finding the firm guilty?
ii) What hypothesis is being tested if a jury commits type II error
by finding the firm guilty?
A force applied to an object of mass m1 produces an acceleration of 2.00 m/s square.
(A) what is the ratio m1/m2
(B) if m1 and m2 are combined,find their acceleration under the action bof the force F
1. Trace and comment each and every line of the C++ program below:
#include <iostream>
using namespace std;
int binarySearch(int arr[], int left, int right, int num)
{
if (right >= left) {
int mid = left + (right - left) / 2;
if (arr[mid] == num)
return mid;
if (arr[mid] > num)
return binarySearch(arr, left, mid - 1, num);
return binarySearch(arr, mid + 1, right, num);
}
return -1;
}
int main(void)
{
int arr[] = { 2, 3, 4, 8, 10, 40 };
int check = 40;
int n = sizeof(arr) / sizeof(arr[0]);
int result = binarySearch(arr, 0, n - 1, check);
(result == -1)
? cout << "Element is not present in array"
: cout << "Element is present at index " << result;
return 0;
}
3. Write a C++ recursive function that takes a string and reverse the string.
4. Write a C++ recursive function that takes an array of words and returns an array
that contains all the words capitalized.
5. Write a linear search C++ program that searches for a number in a two
dimensional array.
6. What is each on the following functions going to achieve:
a)
int fun(int x, int y)
{
if (x == 0)
return y;
else
return fun(x - 1, x + y);
}
b)
int fun(int a, int t)
{
if (a == 0)
return t;
t = (t * 10) + (a % 10);
return fun(a / 10, t);
}
consider the following system of equations:
3x + 4y +5z = 66
7x + 4y +3z = 74
8x + 8y +9z = 136
a. write down the associated augmented matrix for this system of equations and the coefficient matrix A.
b. by performing elementary row operations of the augmented matrix, solve the system of equations or show that no solution exists. In case there exist infinitely many solutions, then the solution to the system must be written in parametric form.
c. Based on your answer in b, what is the rank of the coefficient matrix A?
Consider the process of taking the average of a list of N (real) numbers. The list will be contained in an array, X, of real numbers. The numbers will be referenced as X[0], X[1], X[2], ..., X[N-1].
a) Prove that the process of taking the average of a list of N real numbers is recursive.
Hint: Use function polymorphism.
b) As a result of a) above or otherwise, write the corresponding polymorphic and
recursive C++ function that computes the average of a list of N numbers.
Consider a list of (real) numbers, X, of length N. Squaring each number in the list is a recursive process. Prove this by writing a polymorphic and recursive C++ function
template <class Type>
Type * square (Type * X, long int N)
{
// C++ code
}
which recursively squares each element in X and returns that list (i.e. X with
elements squared).