Questions
I'm having a problem getting my code to function correct, *num_stu keeps losing its value when...

I'm having a problem getting my code to function correct, *num_stu keeps losing its value when ever another function is called from the class. Can someone proof read this for me and let me know what'd up?

Header.h file
#include <iostream>

using namespace std;

class report {
   private:
       int* num_stu;
        int xx;
       int* id;
       double* gpa;

   public:
      
        report(int x) {
            num_stu = &x;
            xx = x;
            id = new int[*num_stu];
            gpa = new double[*num_stu];

            for (int i = 0; i < *num_stu; i++) {
                id[i] = 0;
                gpa[i] = 0;
            }
        }

        void assign() {
            cout <<"You still losing your value? " << *num_stu << endl << num_stu << xx << endl;;
            for (int i = 0; i < *num_stu; i++) {
                cout << "Enter ID: " << endl;
                cin >> id[i];
                cout << "Enter GPA: " << endl;
                cin >> gpa[i];
              
            }
        }

        void print_info() {

            for (int i = 0; i < *num_stu; i++) {
                cout << id[i] << " " << gpa[i] << " ";

                if (gpa[i] >= 3.8) {
                    cout << "an honor student. ";

                }
                cout << endl;
            }
        }

        ~report() {
            delete[]id;
            delete[]gpa;
        }


};

Main.cpp file

#include <iostream>
#include "report.h"

using namespace std;


int main() {
  
   report boy(5);
   boy.assign();
   boy.print_info();
}

In: Computer Science

1) Objective: To conduct a hypothesis test for − The following are weights in pounds for...

1) Objective: To conduct a hypothesis test for

The following are weights in pounds for a simple random sample of 20 newborn baby boys and baby girls born in the U.S.

Baby boy birth weights:

6.6,  7.9,  6.4,  7.6,  6.4,  8.1,  7.9,  8.3,  7.3,  8.2

6.7,  6.2,  7.5,  7.8,  7.6,  6.8,  7.9,  8.7,  6.4,  8.4

Baby girl birth weights:

7.3,  7.1,  6.1,  7.4,  6.0,  6.9,  8.2,  7.5,  5.9,  8.1,

7.3,  6.8,  8.1,  6.7,  6.3,  7.2,  6.4,  6.9,  6.2,  8.0

Assume that the birth weights of both populations are roughly normally distributed.  Can you conclude that mean weights are greater for boys born in the U.S. than for girls? Use the P-value method with

Step 1) Check the assumptions

Simple random sample both populations

Independent (different individuals)

Normally distributed (10 individuals <30)

Step 2) Write the null and alternate hypotheses

:

:

Step 3) Draw, label, sketch: test statistic and the region(s) beyond the test statistic

Step 4) P-value =

Step 5) Decision: reject or do not reject

Is P-value ≤ α?

Yes à reject

No à do not reject

Formal conclusion:

In: Statistics and Probability

Chapter 19 Differing Parenting Styles Lisette and Joel are a couple in their 20s. They have...

Chapter 19 Differing Parenting Styles Lisette and Joel are a couple in their 20s. They have a 2-week-old baby boy and have come in for a well-baby check of their healthy infant. Joel is carrying the infant with Lisette trailing behind. When the nurse inquires how things are going at home, Lisette becomes tearful and Joel looks away. As the nurse questions them further, it becomes evident that the couple differs in their perception of how the baby should be cared for. Lisette was raised in various foster homes after being taken from her abusive mother at 3 years of age, and she has no relatives who are involved in her life at the present time. Joel comes from a large, affectionate family who is thrilled with the new baby and frequently visits. While visiting, they take over the care of the baby. Lisette has been feeling overwhelmed by the care of the infant and often just lets him cry in his crib. Immediately, Joel or one of his family members always picks up the baby when he cries.

1. What can the nurse do to help this couple?

2. What specific interventions may be helpful?

3. How can Joel’s family help?

4. What other resources are important for this family?

In: Nursing

A person is most likely to contract diseases such as Rocky Mountain spotted fever and Lyme...

A person is most likely to contract diseases such as Rocky Mountain spotted fever and Lyme disease if he or she visits/participates in

Question 66 options:

snow skiing

camping and hiking in the backcountry

metropolitan cities

European countries

Which pathogens are transmitted via blood exchange?

Question 67 options:

Hepatitis B

HIV

Hepatits C

All of the above

Birds are the reservoir for West Nile Virus.

Question 69 options:

True
False

Which form of the plague has the highest mortality rate AND is the most contagious?

Question 70 options:

Bubonic

Septicemic

Pneumonic

B and C

A 5-year old boy is taken to the ER by his mother because he has had a high fever, cough, runny nose, and watery eyes for 3 days. Yesterday she noticed a rash on his upper neck that has now spread down is body. The ER doctor also observed white Koplik’s spots on the inside of his cheek? What is the most likely cause of his symptoms?

Question 71 options:

Measles

Chicken Pox

Mumps

Rubella

Which of the following diseases CAN be passed mother to child during childbirth?

Question 72 options:

Chlamydia

Gonorrhea

West Nile

A and B

In: Anatomy and Physiology

Age and Marital Status of Women The following two-way table describes the age and marital status...

Age and Marital Status of Women

The following two-way table describes the age and marital status of American women in 1995. The table entries are in thousands of women.

Marital Status

Age (years)

Never married

Married

Widowed

Divorced

Total

18-24

9289

3046

19

260

12614

25-39

6948

21437

206

3408

31999

40-64

2307

26679

2219

5508

36713

>=65

768

7767

8636

1091

18262

Total

19312

58929

11080

10267

99588

1)(4 Points)Report the marginal distribution of marital status for all adult women (use percents). Draw a bar graph to display this distribution (draw either in Excel or in SPSS).

2) (4 Points)Compare the conditional distributions of marital status for women aged 18 to 24 and women aged 40 to 64. Briefly describe the most important differences between the two groups of women, and back up your description with percents.

3) (4 Points)You are planning a magazine aimed at women who have never been married. Find the conditional distribution of age among single women (those who have never been married) and display it in a bar graph (with either Excel or SPSS). What age group or groups should your magazine aim to attract?

In: Statistics and Probability

Age and Marital Status of Women The following two-way table describes the age and marital status...

Age and Marital Status of Women

The following two-way table describes the age and marital status of American women in 1995. The table entries are in thousands of women.

Marital Status

Age (years)

Never married

Married

Widowed

Divorced

Total

18-24

9289

3046

19

260

12614

25-39

6948

21437

206

3408

31999

40-64

2307

26679

2219

5508

36713

>=65

768

7767

8636

1091

18262

Total

19312

58929

11080

10267

99588

1) (4 Points) Report the marginal distribution of marital status for all adult women (use percents). Draw a bar graph to display this distribution (draw either in Excel or in SPSS).

2) (4 Points) Compare the conditional distributions of marital status for women aged 18 to 24 and women aged 40 to 64. Briefly describe the most important differences between the two groups of women, and back up your description with percents.

3) (4 Points) You are planning a magazine aimed at women who have never been married. Find the conditional distribution of age among single women (those who have never been married) and display it in a bar graph (with either Excel or SPSS). What age group or groups should your magazine aim to attract?

In: Statistics and Probability

Age and Marital Status of Women The following two-way table describes the age and marital status...

Age and Marital Status of Women

The following two-way table describes the age and marital status of American women in 1995. The table entries are in thousands of women.

Marital Status

Age (years)

Never married

Married

Widowed

Divorced

Total

18-24

9289

3046

19

260

12614

25-39

6948

21437

206

3408

31999

40-64

2307

26679

2219

5508

36713

>=65

768

7767

8636

1091

18262

Total

19312

58929

11080

10267

99588

1) (4 Points) Report the marginal distribution of marital status for all adult women (use percents). Draw a bar graph to display this distribution (draw either in Excel or in SPSS).

2) (4 Points) Compare the conditional distributions of marital status for women aged 18 to 24 and women aged 40 to 64. Briefly describe the most important differences between the two groups of women, and back up your description with percents.

3) (4 Points) You are planning a magazine aimed at women who have never been married. Find the conditional distribution of age among single women (those who have never been married) and display it in a bar graph (with either Excel or SPSS). What age group or groups should your magazine aim to attract?

In: Statistics and Probability

City1 City 2 City 3 City 4 789 748 1831 1756 2051 1501 740 2125 765...

City1 City 2 City 3 City 4
789 748 1831 1756
2051 1501 740 2125
765 1886 1554 1995
1645 1593 137 1526
1266 1474 2276 1746
2138 1913 2144 1616
1487 1218 1053 1958
1622 1006 1120 1675
1169 343 1838 1885
2215 1494 1735 2204
167 580 1326 2409
2557 1320 1790 1338
634 1784 32 2076
1326 1044 1455 2375
1790 890 1913 1125
32 1708 1218 1326
1455 1913 1006 1790
1218 343 32
1006 1494 1455
343 580

(1) Using the above table, data set has information on the account balances of customers at a bank’s four locations. Using that data set and an ? of 0.05, test the null hypothesis that the mean account balances are equal in the four towns using a one-way ANOVA in Excel?. Please provide a picture of the excel spreadsheet with the ANOVA Test results.

(2) Do you reject the null hypothesis or not? Indicate on which part of the Excel output you base your decision.

(3) Assuming that an acquaintance of yours has never heard of ANOVA, explain to him what the decision in part (b), i.e., “rejecting H0” or “not rejecting H0” means in this context at a level that can be understood by a high school senior.

In: Statistics and Probability

An economist with a major bank wants to learn, quantitatively, how much spending on luxury goods...

An economist with a major bank wants to learn, quantitatively, how much spending on luxury goods and services can be explained based on consumers’ perception about the current state of the economy and what do they expect in the near future (6 months ahead).  Consumers, of all income and wealth classes, were surveyed.  Every year, 1500 consumers were interviewed.  The bank having all of the data from the 1500 consumers interviewed every year, computed the average level of consumer confidence (an index ranging from 0 to 100, 100 being absolutely optimistic) and computed the average dollar amount spent on luxuries annually.  Below is the data shown for the last 24 years.

Date                 X                     Y (in thousands of dollars)

1994                79.1                 55.6

1995                79                    54.8

1996                80.2                 55.4

1997                80.5                 55.9

1998                81.2                 56.4

1999                80.8                 57.3

2000                81.2                 57

2001                80.7                 57.5

2002                80.3                 56.9

2003                79.4                 55.8

2004                78.6                 56.1

2005                78.3                 55.7

2006                78.3                 55.7

2007                77.8                 55

2008                77.7                 54.4

2009                77.6                 54

2010                77.6                 56

2011                78.5                 56.7

2012                78.3                 56.3

2013                78.5                 57.2

2014                78.9                 57.8

2015                79.8                 58.7

2016                80.4                 59.3

2017                80.7                 59.9

Question:

  1. Construct the linear regression model for the dollar amount spent on luxury goods and services.

In: Statistics and Probability

“The Dow 10 Strategy” maintains a portfolio of the 10 highest yielding Dow Jones industrial stocks....

The Dow 10 Strategy” maintains a portfolio of the 10 highest yielding Dow Jones industrial stocks. Consider the data as per table, for the 25 years.

  1. Compute the average annual returns for the Dow Jones Portfolio and the Dow 10 Strategy portfolio. Comment about the reward.
  2. Compute the sample standard deviation for each portfolio. Comment about risk.
  3. Compute the geometric mean Xg of 1+Rj for each portfolio. Compute (Xg)-1. What does this last number represent?
  4.   is the equation relating least squares slope , Correlation  r and sample standard deviation. Compute the r for Dow 10 versus Dow Jones.

Note:   Use of calculators and computers is highly recommended.

Year

DJIA*Total Returns

Dow 10 Strategy**Total Return

1972

18.18%

23.32%

1973

-13.16%

3.96%

1974

-23.21%

-0.72%

1975

44.48%

56.03%

1976

22.75%

34.93%

1977

-12.76%

-1.75%

1978

2.62%

0.12%

1979

10.52%

12.99%

1980

21.45%

27.23%

1981

-3.40%

7.73%

1982

25.84%

26.05%

1983

25.68%

38.75%

1984

1.07%

5.75%

1985

32.83%

29.40%

1986

26.96%

34.79%

1987

6.00%

6.07%

1988

15.97%

24.33%

1989

31.74%

25.66%

1990

-0.61%

-7.57%

1991

23.99%

34.02%

1992

7.37%

7.79%

1993

16.74%

26.91%

1994

4.94%

4.05%

1995

36.47%

36.51%

1996

28.58%

28.18%

In: Finance