A sample of 50 night-school students' ages is obtained in order to estimate the mean age of night-school students. x = 24.3 years. The population variance is 16.
(b) Find the 95% confidence interval for μ. (Give your
answer correct to two decimal places.)
Lower Limit
Upper Limit
(c) Find the 99% confidence interval for μ. (Give your answer correct to two decimal places.)
Lower Limit
Upper Limit
In: Math
Physical activity generally declines when students leave high school and enroll in college. This suggests that college is an ideal setting to promote physical activity. One study examined the level of physical activity and other health-related behaviors in a sample of 1183 college students. Let's look at the data for physical activity and consumption of fruits. We categorize physical activity as low, moderate, or vigorous and fruit consumption as low, medium, or high. Here is the two-way table that summarizes the data.
| Physical activity | ||||
|---|---|---|---|---|
| Fruit consumption | Low | Moderate | Vigorous | Total |
| Low | 68 | 207 | 293 | 568 |
| Medium | 25 | 126 | 170 | 321 |
| High | 14 | 110 | 170 | 294 |
| Total | 107 | 443 | 633 | 1183 |
The first step in performing the significance test is to calculate the expected cell counts. Let's start with the cell for students with low fruit consumption and low physical activity. Use the following formula for expected cell counts.expected count =
| row total ✕ column total |
| n |
Using the formula, we need three quantities:
(1) the corresponding row total, 568, the number of students who
have low fruit consumption,
(2) the column total, , the number of students who have
low physical activity, and
(3) the total number of students, 1183.
The expected cell count is therefore the following.
|
|
||
| 1183 |
= 51.37Note that although any observed count of the number of
students must be a whole number, an expected count need not
be.
Calculations for the other eight cells in the 3 ✕ 3 table are
performed in the same way. With these nine expected counts we are
now ready to use the following formula for
the χ2
statistic.χ2 =
|
|||
The first term in the sum comes from the cell for students with low fruit consumption and low physical activity. The observed count is and the expected count is 51.37. Therefore, the contribution to the χ 2 statistic for this cell is the following.
|
||||
| 51.37 |
= 5.38When we add the terms for each of the nine cells, the result is the following. (Round your answer to two decimal places.)
χ 2 =
Because there are
r = 3
levels of fruit consumption and
c =
levels of physical activity, the degrees of freedom for this statistic are the following.df = (r − 1)(c − 1) = (3 − 1)
− 1
= Under the null hypothesis that fruit consumption and physical activity are independent, the test statistic χ 2 has a χ 2
distribution. To obtain the P-value, look at the
df =
row in Table F. The calculated value
χ 2 =
lies between the critical points for probabilities 0.005 and 0.01. The P-value is therefore between 0.005 and 0.01. (Software gives the value, rounded to four decimal places, as 0.0081.) There ---Select--- is is not strong evidence at α = 0.01 that there is a relationship between fruit consumption and physical activity.
In: Statistics and Probability
Consider the following database schema:
LIKE(person, sport),
PRACTICE(person, sport),
where person and sport are keys in both tables. The table LIKE
gives the sports a person likes, the table PRACTICE gives the
sports a person practices. We assume that a person likes at least
one sport and practices at least one sport. We assume also that a
person does not like a sport if the sport is not listed among the
sports that a person likes
Express the following queries in Calculus
List the people who practice at list one sport they like
List the people who practice at least one sport they do not
like
List pairs of people who practice at least one common sport
List the people who like all the sports they practice
List the people who practice all the sports they like
List the people who practice all the sports John likes
In: Computer Science
This is all in Python. Also, the names come from a .txt file that i have created with 3 names on it(Jim,Pam,Dwight).
Main Function. Write a program where the user enters a name. Using the read function, check to see if the name is in the text document. If it is, respond back to the user the name is found within the list.
Read Function. The read function should return the contents of the text document as a list.
EXAMPLE OUTPUT
Please enter a name: Jim
Jimis found in the list.
Enter another name (Y/N): Y
Please enter a name: Andy
Sorry, Andy was not found in the list. Would you like to add it?
(Y/N): Y
Andrew has been added to the list.
Enter another name (Y/N): N
Write Function. The write function should take the list and override the file with the new names list in reverse alphabetical order with a hard return after each name.
In: Computer Science
Write a recursive function, max_in_list(my_list), which takes an non-empty list, my_list, of integers as a parameter. This function calculates and returns the largest value in the list. The base case will probably deal with the scenario where the list has just one value. The recursive case will probably call the function recursively using the original list, but with one item removed.
Note: This function has to be recursive; you are not allowed to use loops to solve this problem!
| Test | Result |
|---|---|
lst = [1, 4, 5, 9] print(max_in_list(lst)) |
9 |
And
Write a recursive function, max_even_list(my_list), which takes a list, my_list, of integers as a parameter. This function calculates and returns the largest even number in the list. 0 is returned if there is no even number in the list.
Note: This function has to be recursive; you are not allowed to use loops to solve this problem!
| Test | Result |
|---|---|
lst = [1, 4, 5, 9] print(max_even_list(lst)) |
4 |
In: Computer Science
In: Biology
13.14 LAB: Contains the character
Write a program that reads an integer, a list of words, and a character. The integer signifies how many words are in the list. The output of the program is every word in the list that contains the character at least once. Assume at least one word in the list will contain the given character.
Ex: If the input is:
4 hello zoo sleep drizzle z
then the output is:
zoo drizzle
In c++
In: Other
Start with the provided code for the class linkedListType. Be sure to implement search, insert, and delete in support of an unordered list (that code is also provided).
Now, add a new function called insertLast that adds a new item to the END of the list, instead of to the beginning of the list. Note: the link pointer of the last element of the list is NULL.
Test your new function in main.
Submit a .zip of your entire project.
In: Computer Science
Using the Python program:
a/ Write a program that adds all numbers from 1 to 100 to a list (in order). Then remove the multiples of 3 from the list. Print the remaining values.
b/ Write a program that initializes a list with ten random integers from 1 to 100. Then remove the multiples of 3 and 5 from the list. Print the remaining values.
Please show your work and explain. Thanks
In: Computer Science
This program is about list comprehension.
list1 = [2, 5, 7, 8]
list2 = [1, 2]
(e) Use nested list comprehension with list1 and list2 as input sequences to generate this list:
[[3, 4], [6, 7], [8, 9], [9, 10]]
Display the list.
The following is the expected output.
Part e: [[3, 4], [6, 7], [8, 9], [9, 10]]
In: Computer Science