Studies have shown that people who are using safety equipment when engaging in an activity tend to take increased risks. Will risk taking increase when people are not aware they are wearing protective equipment and are engaged in an activity that cannot be made safer by this equipment? Participants in the study were falsely told they were taking part in an eye-tracking experiment for which they needed to wear an eye-tracking device. Eighty subjects were divided at random into two groups of 40 each, with one group wearing the tracking device mounted on a baseball cap and the other group wearing it mounted on a bicycle helmet. Subjects were told that the helmet or cap was just being used to mount the eye tracker. All subjects watched an animated balloon on a video screen and pressed a button to inflate it. The balloon was programmed to burst at a random point, but until that point, each press of the button inflated the balloon further and increased the amount of fictional currency a subject would earn. Subjects were free to stop pumping at any point and keep their earnings, knowing that if the balloon burst, they would lose all earnings for that round. The score was the average number of pumps on the trials, with lower scores corresponding to less risk taking and more conservative play. Here are the first 10 observations from each group.
Helmet: 3.67 36.50 29.28 30.50 24.08 32.10 50.67 26.26 41.05 20.56
Baseball Cap: 29.38 42.50 41.57 47.77 32.45 30.65 7.04 2.68 22.04 25.86
Compare the distributions for the two groups. How is wearing of a helmet related to the measure of risk behavior? Hint: Create side by side box and whisker plots.
In: Statistics and Probability
A weight-lifting coach wanted to know whether weight-lifters can change their strength by taking a certain supplement. To answer this question, the coach randomly selected 8 athletes and gave them a strength test using a bench press. Thirty days later, after regular training using the supplement, they were tested again. The results were listed below. A test was conducted to determine whether weight-lifters can change their strength by taking a certain supplement. Assume the populations are normally distributed.
Athlete 1 2 3 4 5 6 7 8 Mean SD
Before 215 240 188 212 275 260 225 200 226.88 29.72
After 225 245 188 210 282 275 230 195 231.25 34.55
Difference -10 -5 0 2 -7 -15 -5 5 -4.38 6.55
1. What is the null hypothesis for this test?
2. What is the value of the standardized test statistic?
3. The p-value was 0.05. Suppose this test was conducted at α = 0.01. What can you conclude?
a. There is insufficient evidence to conclude that weight-lifters can change their strength by taking a certain supplement.
b. There is sufficient evidence to conclude that weight-lifters can change their strength by taking a certain supplement.
c. None of the above; this test is invalid.
4. Suppose the coach had incorrectly performed a two-sample t-test. In comparison to the correct analysis, which of the following regarding the test statistic would be true?
a. The test statistic is closer to 0
b. The test statistic is farther from 0
c. The test statistic does not change.
In: Statistics and Probability
python
please take it out from class and make it all functions, add subtraction and multiplication functions with it.
than you so much for helping me out.
import random
image = 'w'
class cal():
def __init__(self, a, b):
self.a = a
self.b = b
def add(self):
return self.a + self.b
a = random.randint(0, 9)
b = random.randint(0, 9)
obj = cal(a, b)
print("0. Exit")
print("1. Add")
choice = int(input("Enter choice: "))
cnt = 0 # To hold number of tries
if choice == 1:
while True:
print(" what do you think the sum of these two numbers are? ", a, " + ", b)
print("This is how it looks viually", a * image, "+ ", b * image)
sum = input()
answer = int(sum)
if answer == obj.add():
print("Perfect, the answer is correct...")
cont = input("\nIf you want to solve another question then press 1. If not then any other key ")
if cont == "1":
a = random.randint(0, 9)
b = random.randint(0, 9)
obj = cal(a, b)
cnt = 0
continue
else:
break
elif answer != obj.add():
print("I am sorry, your answer is wrong Sean,Please Try again:")
# Incrementing count
cnt = cnt + 1
# Checking count
if cnt == 3:
# Prompting for next try
ans = input(
"\nMax number of tries reached. Do you want to try another question or quit? (T/Q): ")
# Checking answer
if ans.upper() == "T":
a = random.randint(0, 9)
b = random.randint(0, 9)
obj = cal(a, b)
continue
else:
break
else:
continueIn: Computer Science
Healthy Lifestyles
The Centers for Disease Control and Prevention (CDC) in Atlanta, Georgia, is the government agency responsible for disease-related issues in the United States. The CDC coordinates efforts to counteract outbreaks of diseases and funds a variety of medical and health research studies. The CDC also serves as a central clearinghouse for health-related data.
The CDC conducts the annual Behavioral Risk Factor Surveillance Survey. The survey measures a whole series of lifestyle characteristics that relate to health and longevity, such as smoking and use of seat belts. The survey compiles data on a stateby-state basis. Not all states are surveyed.
The data set from the 1990 Behavioral Risk Factor Surveillance Survey is on the accompanying CD in the file named HEALTHY. All numbers are percentages, and asterisks indicate the missing data for that state.
Your task is to prepare a summary of these data. Your report is to be issued to major news organizations, such as the Associated Press, and will appear in major newspapers around the United States. For this reason, it would be inappropriate to use technical jargon in your report.
Your boss has suggested a few general ideas about what is likely to appeal to your target audience. As you study the data, you might find other things worth including.
Questions
1. Report any interesting (i.e., unexpected, humorous, or odd) differences between states.
2. Devise a weighted index of all seven lifestyle variables. The weighted index is to serve as an overall or composite measure of healthy lifestyles. Apply your weight to the states of Minnesota, Florida, and California as an example of what your weighted index shows.
3. Discuss any noteworthy limitations of the survey or data set.
In: Statistics and Probability
answer the following questions based on the learning and your personal knowledge – with the concept of Best Practices at mind. Today, you are all marketing teams for your brand. You are working on the Promotion function:
1.How is your brand currently promoted (be specific)? Detail all of the ways (do some research) and show examples.
2.Create a new promotion strategy (using IMC principles) for the brand and choose a minimum of three tools in the promotion mix. Why did you choose these? What goals do they accomplish? How does this new IMC strategy fit with the Marketing Mix, Positioning, and Differentiation strategy for your company.
3. There was a quality problem a month ago and your brand has to recall all of the products made that day (10,000 items). Craft a Press Release and create a Public Relations strategy that fits with your IMC strategy while alerting customers to problem/solution.
4. Check out the company/brand’s website. Develop a detailed profile of consumers attracted to Web site and why. What are the primary methods used to drive traffic to the Web site? What is the value addition for the current or new customer base?
5. What social media Web site(s) does the company utilize? Social media objectives are listed in Chapter 22 on page 356. Identify the company’s primary social media objectives based on actual communications on its social networking site. Be sure to provide examples.
6. Compare the company’s social networking site with its official Web site. How does the content and language differ between the two sites?
7. What do you recommend that the company do to stay on top of current social media trends?
In: Accounting
// FILE: guess.cxx
// Demostrates a guessing game function that's used as a time
analysis example.
#include <cassert> // Provides assert
#include <iostream> // Provides cout and cin
#include <cstdlib> // Provides EXIT_SUCCESS
using namespace std; // Allows all Standard Library items to be
used
// Prototype for the function used in this demonstration
program
void guess_game(int n);
// Precondition: n > 0.
// Postcondition: The user has been asked to think of a number
between 1 and n.
// The function asks a series of questions, until the number is
found.
int main( )
{
guess_game(100);
return EXIT_SUCCESS;
}
void guess_game(int n)
// Library facilities used: cassert, iostream
{
int guess;
char answer;
assert(n >= 1);
cout << "Think of a whole number from 1 to " << n
<< "." << endl;
answer = 'N';
for (guess = n; (guess > 0) && (answer != 'Y')
&& (answer != 'y'); --guess)
{
cout << "Is your number " << guess << "?"
<< endl;
cout << "Please answer Y or N, and press return: ";
cin >> answer;
}
if ((answer == 'Y') || (answer == 'y'))
cout << "I knew it all along." << endl;
else
cout << "I think you are cheating!" << endl;
}
1) The source code must be well structured and include relevant comments like on the top lines version, date, and a brief description of what the program does.
2) . As you make changes you can add one line description of the
changes and change the version # or add a version #
like version 1.0 and 1.1
3) Write a short report (not to exceed 100 words) that describes the work done, the input, and output when executing the program.
In: Computer Science
Lab 7 - Rectangle class- (Lec. 7)
1.) Create a new project and
name it: Rectangle
|
2.) Create the following 3 files:
3.) Write a program that produces
this output:
Rectangle.h
4.)In the Rectangle.h file, write a class specification for a Rectangle class.
2 private data members: _width (int) and _length (int)
7 public member functions:
Default constructor - Assigns ‘safe’ values to the data members.
Descructor
setWidth – An int value, passed from main(), is assigned to _width.
setLength - An int value, passed from main(), is assigned to _length.
getWidth – Returns the object’s width.
getLength – Returns the object’s length.
getArea – Calculates the area of the Rectangle object and returns the value.
Rectangle.cpp
5.) In the Rectangle.cpp file, write a function implementation for each function
prototype listed in the Rectangle class specification.
Source.cpp
6.)In main(), declare an object of Rectangletype, and name it: tennisCourt
7.) In main(), declare three variables of double data type, and
and name them: width, length and area
6.) Prompt the user to enter a width and length (see output).
7.) Read in the user’s inputs and assign them to the data members of tennisCourt,
by using the ‘set’ member functions.
8.)Then assign the tennis court’s width, length and area to variable in main() by
using the ‘get’ member functions.
9.)Display the width, length, and area. (see output)
In: Computer Science
Assignment 3C: Answer the following questions
Question 1.
a. Declare a 32-bit signed integer variable and initialize it with the smallest possible negative decimal value.
b. Declare an uninitialized array of 100 16-bit unsigned integers.
c. Declare a string variable containing the word “DVC” repeated 20 times, and terminated with the null char.
Question 2
For the following declarations, assuming that the address of I is 404000h
What are the addresses of J, K, and L?
What is the total number of allocated bytes?
Show the content of the individual bytes allocated in memory in hexadecimal
.DATA
I SBYTE 1, -1
J SWORD 10FFh, -256
K DWORD 23456h
L BYTE 'DVC'
Question 3
Given the following definitions:
.DATA
wval LABEL WORD
barray BYTE 10h, 20h, 30h, 6 DUP (0Ah)
ALIGN 4
warray WORD 5 DUP (1000h)
pressKey EQU <"Press any key to continue ...", 0>
darray DWORD 5 DUP (56789ABh), 7 DUP (12345678h)
dval LABEL DWORD
prompt BYTE pressKey
What will be the value of EAX, AX, and AL after executing each of the following instructions? Assume that the address of barray is 404000h.
a. mov eax, TYPE warray
b. mov eax, LENGTHOF barray
c. mov eax, SIZEOF darray
d. mov eax, OFFSET warray
e. mov eax, OFFSET darray
f. mov eax, OFFSET prompt
g. mov eax, DWORD PTR barray
h. mov al, BYTE PTR darray
i. mov ax, wval
j. mov eax, dval
In: Computer Science
*****************************************************
* USE UBUNTU (Linux) TERMINAL MODE COMMANDS ONLY *
* DO NOT USE ANY EDITORS TO CREATE THIS PROGRAM *
*****************************************************
1) Create a file called lastNameFirstNameInitialpgm3.sh ex: robinsonMpgm1.sh
2) Append to the above file the necessary commands that when this file is executed
it will display the following:
- Using your own set of multi-line comments enter your program identification
as described in the Syllabus, example:
<<ID
**************************************************
Author : Your Name
Course : Course Name and Times
Professor: Michael Robinson
Program : Program Number, Purpose/Description
A brief description of the program
Due Date : mm/dd/yyyy
I certify that this work is my own alone.
**************************************************
ID
- Append to the file the following commands that when this file is executed it will do the following:
1) Display Hello my name is:
2) Display My user name is:
3) Display Todays date and time is:
4) Display This file has x lines
5) Display This file has x words
6) Display this file has x bytes
7) Display Please enter any number
8) Display Your number $number * 2 = XXX and display press any key to continue
9) Display a new clean screen
10) Display Enter a line of numbers to be added
11) Using enhanced for loop, display all numbers entered delaying the output
of each number by 1 second each and then the total of adding thoses numbers:
ex: 20 5 3 = 28
12) Using a while true loop request, accept and display data until it ends on
input mod 5 = 0
using -lt and -gt comparison commands
this uses if else
In: Computer Science
|
You have just completed your first week employed as assistant
executive manager in a 180-bed skilled nursing facility, named
Sanctuary Nursing Home. On your first day, the facility CEO gave
you a tour of the facility, introducing you to staff and residents.
Throughout the week, you have been observing and getting to know
your staff and residents.
As a new manager, you recognize a need to: 1) engage in an in-depth assessment of quality of care being provided at Sanctuary, and 2) develop a plan to proactively improve care quality and prevent citations or sanctions from external oversight entities. Question Do you think that the situation as described here at Sanctuary is typical of skilled nursing facilities, or do you think that nursing homes suffer from poor, inaccurate press based on a few isolated situations? |
In: Operations Management