The following data represent the smoking status by level of education for people 18 years old or older.
Smoking Status
Number of Years of Education current former never
<12 159 98 196
12 148 81 150
13-15 44 29 33
16 or more 32 26 40
Test whether smoking status and level of education are independent.
a. What is the expected value of the number of Former smokers and 13-15 Years of Education, if we assume that the two variables are independent?
b. Show/explain why the requirements are satisfied.
c. State the p-value
d. State the conclusion so anyone can understand it, using the “best” significance level.
In: Statistics and Probability
A cosmetic company is interested in testing the effectiveness of a new cream for treating skin blemishes. It measured the effectiveness of the new cream compared to the leading cream on the market and a placebo. Data below shows the number of blemishes removed after using the cream for 1 week. Assume two-tailed with an α = .05.
|
New Cream |
Leading Cream |
Placebo Cream |
|
81 |
48 |
18 |
|
32 |
31 |
49 |
|
42 |
25 |
33 |
|
62 |
22 |
19 |
|
37 |
30 |
24 |
|
44 |
30 |
17 |
|
38 |
32 |
48 |
|
47 |
15 |
22 |
|
49 |
40 |
18 |
|
41 |
48 |
20 |
Write hypotheses
Determine the Critical value
Compute test statistic
evaluate the null
In: Statistics and Probability
C++
---------------------------------------------
Do a comparison of a slow sort with Big O(n2) (selection sort, insertion sort, or bubble sort) and one faster sort of Big O(n * log n) (mergesort or quicksort). Count the number of moves (a swap counts as one move). With mergesort, you can count the range of the part of the array you are sorting (i.e. last-first+1). Use the code from the textbook (copy from the lecture notes) and put in an extra reference parameter for the count.
The array needs to be 10,000 items and the number of digits should be 4. Use the srand function to set the seed and rand function to generate the numbers (use the BubbleSort support code from the Examples, chapter 11). For instance:
srand(seed);
for (int x = 0; x < 10000; x++)
ary[x] = rand() % 10,000;
Would fill the array. Note: do NOT use the "srand(time(NULL)):". You need to recreate the array to be resorted yet again. Note: you can use the sortSupport code on Canvas.
Call the slow sort first, print out the number of moves and the first 10 and last 10 values, fill the array again using the same seed, call the fast sort, and print the number of moves and the first 10 and last 10 values.
The run would look like:
The seed to use is: 39
Bubble sort had 25349145 swaps
The first 10 values: 0 0 0 3 3 6 6 7 7 9
The last 10 values: 9991 9991 9991 9992 9992 9994 9997 9997 9998 9998
Merge sort had 133616 moves
The first 10 values: 0 0 0 3 3 6 6 7 7 9
The last 10 values: 9991 9991 9991 9992 9992 9994 9997 9997 9998
9998
-------------------------------------------------------------------------------------------------------------
#include <cstdlib>
#include <iostream>
#include "sortSupport.h"
#ifndef SORTSUPPORT_CPP
#define SORTSUPPORT_CPP
using namespace std;
// Does seed first
// creates data for the array
template<class ItemType>
void makeArray(ItemType ary[], int max, int seed)
{
srand(seed);
for (int index = 0; index < max; index++)
ary[index] = rand() % MAX_VALUE;
}
// prints the first 10 and last 10 items of an array
template<class ItemType>
void printEnds(ItemType ary[], int max)
{
cout << "First 10: ";
for (int index = 0; index < 10; index++)
cout << ary[index] << " ";
cout << endl << "Last 10: ";
for (int index = max - 10; index < max; index++)
cout << ary[index] << " ";
cout << endl;
}
#endif
-----------------------------------------------------------------------------
#ifndef SORTSUPPORT_H
#define SORTSUPPORT_H
#include "bubbleSort.h"
const int MAX_VALUE = 10000;
const int MAX_SIZE = 10000;
const int MAX_DIGITS = 4;
template<class ItemType>
void makeArray(ItemType ary[], int max, int seed);
template<class ItemType>
void printEnds(ItemType ary[], int max);
#include "sortSupport.cpp"
#endif
------------------------------------------------------------------------------
#include <iostream>
#include <string>
const int MAX_SIZE = 50;
/** Merges two sorted array segments theArray[first..mid] and
theArray[mid+1..last] into one sorted array.
@pre first <= mid <= last. The subarrays theArray[first..mid] and
theArray[mid+1..last] are each sorted in increasing order.
@post theArray[first..last] is sorted.
@param theArray The given array.
@param first The index of the beginning of the first segment in theArray.
@param mid The index of the end of the first segment in theArray;
mid + 1 marks the beginning of the second segment.
@param last The index of the last element in the second segment in theArray.
@note This function merges the two subarrays into a temporary
array and copies the result into the original array theArray. */
template<class ItemType>
void merge(ItemType theArray[], int first, int mid, int last)
{
ItemType tempArray[MAX_SIZE]; // Temporary array
// Initialize the local indices to indicate the subarrays
int first1 = first; // Beginning of first subarray
int last1 = mid; // End of first subarray
int first2 = mid + 1; // Beginning of second subarray
int last2 = last; // End of second subarray
// While both subarrays are not empty, copy the
// smaller item into the temporary array
int index = first1; // Next available location in tempArray
while ((first1 <= last1) && (first2 <= last2))
{
// At this point, tempArray[first..index-1] is in order
if (theArray[first1] <= theArray[first2])
{
tempArray[index] = theArray[first1];
first1++;
}
else
{
tempArray[index] = theArray[first2];
first2++;
} // end if
index++;
} // end while
// Finish off the first subarray, if necessary
while (first1 <= last1)
{
// At this point, tempArray[first..index-1] is in order
tempArray[index] = theArray[first1];
first1++;
index++;
} // end while
// Finish off the second subarray, if necessary
while (first2 <= last2)
{
// At this point, tempArray[first..index-1] is in order
tempArray[index] = theArray[first2];
first2++;
index++;
} // end for
// Copy the result back into the original array
for (index = first; index <= last; index++)
theArray[index] = tempArray[index];
} // end merge
/** Sorts the items in an array into ascending order.
@pre theArray[first..last] is an array.
@post theArray[first..last] is sorted in ascending order.
@param theArray The given array.
@param first The index of the first element to consider in theArray.
@param last The index of the last element to consider in theArray. */
template<class ItemType>
void mergeSort(ItemType theArray[], int first, int last)
{
if (first < last)
{
// Sort each half
int mid = first + (last - first) / 2; // Index of midpoint
// Sort left half theArray[first..mid]
mergeSort(theArray, first, mid);
// Sort right half theArray[mid+1..last]
mergeSort(theArray, mid + 1, last);
// Merge the two halves
merge(theArray, first, mid, last);
} // end if
} // end mergeSort
int main()
{
std::string a[6] = {"Z", "X", "R", "K", "F", "B"};
mergeSort(a, 0, 5);
for (int i = 0; i < 6; i++)
std::cout << a[i] << " ";
std::cout << std::endl;
} // end main
/* B F K R X Z */
In: Computer Science
Show all work and answer steps in complete sentences pls list them ex. Step 1 underline steps
A psychologist wants to compare the group of people who exercise regularly and the group of people who do not exercise regularly on the level of stress. She took a sample of 8 people from each population. These numbers indicate the participants’ stress levels. Can she conclude that there is a difference between two groups on the level of stress? Conduct four steps of hypothesis testing. Use a two-tailed test with α = .05.
Not exercise Regular Exercise
3
4
7
4
8
3
5
2
4
5
7
1
6
1
8
4
SS = 24 SS = 16
Step 1: State your null and research hypotheses.
Step 2: What is the df for two groups combined?
Step 3: What are the cut-off points?
Step 4: Find the pooled variance.
Step 5: Find the estimated standard error.
In: Statistics and Probability
Paymore Products places orders for goods equal to 75% of its sales forecast in the next quarter which has been provided in the table below.
| Quarter in Coming Year | Following Year | |||||
| First | Second | Third | Fourth | First Quarter | ||
| Sales forecast | $396 | $333 | $343 | $391 | $391 | |
Paymore’s labor and administrative expenses are $72 per quarter and interest on long-term debt is $47 per quarter. Suppose that Paymore’s cash balance at the start of the first quarter is $40 and its minimum acceptable cash balance is $30. On average, one-third of sales are collected in the quarter that they are sold, and two-thirds are collected in the following quarter. Assume that sales in the last quarter of the previous year were $343. Also, one third of the orders are paid for in the current month and then two thirds of the next quarter's orders are paid in advance. Work out the short-term financing requirements for the firm in the coming year using the above table. The firm pays no dividends. (Do not round intermediate calculations. Round your answers to the nearest whole dollar amount. Negative amounts should be indicated by a minus sign.)
Paymore Products places orders for goods equal to 75% of its sales forecast in the next quarter which has been provided in the table below.
| Quarter in Coming Year | Following Year | |||||
| First | Second | Third | Fourth | First Quarter | ||
| Sales forecast | $396 | $333 | $343 | $391 | $391 | |
Paymore’s labor and administrative expenses are $72 per quarter and interest on long-term debt is $47 per quarter. Suppose that Paymore’s cash balance at the start of the first quarter is $40 and its minimum acceptable cash balance is $30. On average, one-third of sales are collected in the quarter that they are sold, and two-thirds are collected in the following quarter. Assume that sales in the last quarter of the previous year were $343. Also, one third of the orders are paid for in the current month and then two thirds of the next quarter's orders are paid in advance. Work out the short-term financing requirements for the firm in the coming year using the above table. The firm pays no dividends. (Do not round intermediate calculations. Round your answers to the nearest whole dollar amount. Negative amounts should be indicated by a minus sign.)
First Second Third Fourth (need all 4 quarters)
Sources of cashCash at start of period
Net cash inflow
Cash at end of period
0000Minimum operating cash balance
Cumulative financing required
In: Finance
Match the terms as they relate to internal control and/or auditor reporting on internal control with the best description. Replies may be used more than once.
List of terms:
Adverse opinion
As of date
Complementary control
Control Deficiency
Detective control
Material weakness
None of the options apply
Preventive Control
Section 302 of the Sarbanes Oxley Act
Significant deficiency
| 1. | A control deficiency that allows more than a remote possibility of material misstatement |
| 2. | A control deficiency that allows more than a reasonable possibility of material misstatement. |
| 3. | A control deficiency that allows more than a probably possibility of material misstatement. |
| 4. | A control designed to stop a misstatement from occurring. |
| 5. | A control that is designed to identify errors or fraud after they have occurred. |
| 6. | A control that functions with another to achieve the same objective. |
| 7. | A weakness in the design or operation of a control. |
| 8. | A weakness important enough to merit attention, but less severe than a material misstatement. |
| 9. | Date audit report issued. |
| 10. | Last day of the client's fiscal period. |
| 11. | Opinion type issued when one or more significant deficiencies exist. |
| 12. | Opinion type issued when one or more material weaknesses exist. |
| 13. | Section of the Sarbanes-Oxley Act that requires each of a company's principal executives and financial officers to certify the financial and other information in quarterly and annual reports. |
| 14. | Section of the Sarbanes-Oxley Act that requires the audit of internal control over financing reporting. |
| 15. | Section of the Sarbanes-Oxley Act that requires the compilation of interim information. |
In: Accounting
6
Not yet answered
Marked out of 2.50
Flag question
Question text
A company purchased $6,600 of merchandise inventory on account. Which of the journal entries would be required to record this transaction?
Select one:
a.
| Accounts Payable | $6,600 | |
| Purchases | $6,000 |
b.
| Cost of Good Sold | $6,600 | |
| Accounts Payable | $6,600 |
c.
| Inventory | $6,600 | |
| Accounts Payable | $6,600 |
d.
| Accounts Payable | $6,600 | |
| Inventory | $6,600 |
Question 7
Not yet answered
Marked out of 2.50
Flag question
Question text
Which of the following businesses is most likely to use a specific identification cost flow method?
Select one:
a. Hardware Store
b. Grocery Store
c. Car Dealership
d. Roofing Company
Question 8
Not yet answered
Marked out of 2.50
Flag question
Question text
A company purchased inventory at a cost of $65. It later sold the inventory to a customer for $100 cash. What is the journal entry to record the sale of the inventory?
Select one:
a.
| Cash | $65 | |
| Revenue | $65 | |
| Cost of Goods Sold | $100 | |
| Inventory | $100 |
b.
| Cash | $100 | |
| Revenue | $100 | |
| Cost of Goods Sold | $65 | |
| Inventory | $65 |
c.
| Inventory | $100 | |
| Cash | $100 |
d.
| Inventory | $65 | |
| Cash | $65 |
Question 9
Not yet answered
Marked out of 2.50
Flag question
Question text
A company reported the following inventory transactions during the year:
| 1/1/2015 | Beginning Inventory | 20 units | @ $24 |
| 3/17/2015 | Purchase | 60 units | @ $28 |
| 7/28/2015 | Purchase | 40 units | @ $30 |
| 9/12/2015 | Sale | 100 units | @ $50 |
What is the ending inventory using the weighted average cost flow method?
Select one:
a. $600
b. $560
c. $547
d. $480
Question 10
Not yet answered
Marked out of 2.50
Flag question
Question text
Using the weighted average cost flow method for the below transactions, calculate gross margin at year end:
| 1/1/2015 | Beginning Inventory | 20 units | @ $24 |
| 3/17/2015 | Purchase | 60 units | @ $28 |
| 7/28/2015 | Purchase | 40 units | @ $30 |
| 9/12/2015 | Sale | 100 units | @ $50 |
Select one:
a. $2,187
b. $2,240
c. $2,120
d. $2,200
In: Accounting
For the following questions, identify the type of test that should be used. Simply use the corresponding letter: A) One-sample z test (for a mean); B) One-sample t-test; C) One-sample z-test for a proportion (or a chi-squared goodness-of-fit); D) Chi-square goodness of fit (and a z-test is not appropriate); E) Two-sample z-test for a difference between proportions (or a chi-squared test for independence); F) Chi-square test for independence (and a z-test is not appropriate); G) Simple regression; H) Multiple regression; I) Two-independent samples t-test (with homogeneity of variance); J) Two-independent samples t-test (without homogeneity of variance); K) Two-related samples t-test; L) One-way (independent measures) ANOVA; M) One-way Repeated measures ANOVA; N) Two-way ANOVA (independent, mixed, or repeated measures); O) Mann-Whitney; P) Wilcoxon; Q) Kruskal-Wallis; R) Friedman; If you are going down the interval/ratio branch, it is safe to use parametric measures, unless something is directly stated that clearly indicates otherwise, or unless the data strongly and unambiguously indicates otherwise. Similarly, it is safe to assume homogeneity of variance unless it is clearly indicated otherwise. Do not try to analyze whether or not the experiment is tenable or practical or flawless. This is not your concern right now. Most of the below were written by students in this class.
7. Suzie wants to see if attending group counseling sessions affects the frequency of fights at-risk children are involved in. She counts the number of fights six children were involved in the month preceding group counseling, the month during group counseling, and the month following group counseling. The data is below. The null hypothesis is that counseling does not affect the number of fights.
1 2 3 4 5 6
Before 20 20 21 20 37 37
During 25 11 20 11 10 11
After 5 0 4 1 0 7
8. Arlene thinks that the agricultural output of a farm is affected by how many days a farmer works and the size of the farm.
9. We want to know whether cats or dogs take longer to eat their dinner. The data is found below.
Cats: 8, 10, 19, 11, 3, 16, 14, 12, 6 Dogs: 8, 10, 10, 11, 9, 11, 10, 12, 9
In: Statistics and Probability
In: Statistics and Probability
ou are considering two different strategies for a savings account that you intend to close when you retire exactly 29 years from today. For Strategy 1, deposit $1,750 per quarter for 8 years (first deposit today; last one exactly 8 years from today); no new deposits will be made after the end of the deposit period, but interest continues to accrue until the account is closed. For Strategy 2, you’ll make your first quarterly deposit exactly 8 years from today, each quarterly deposit also equals $1,750 , and you’ll continue making quarterly deposits for 21 years, so that you make the final deposit exactly 29 years from today when you close the account. The savings rate always is 7.5% compounded quarterly. What will strategy 1 accumulate at retirement?
In: Finance