Вы находитесь на странице: 1из 8

In-Class Exercises for Tutorials 3.3, 3.4, 3.5, 3.

6
Due Before Next Week’s class.
As you work through the tutorials in class, you will see the following exercises. Complete one
set for each team. Provide your answers in this document submit it via Assignments on
Canvas.
Name__________Nancy Mo_____________ Student Number___301251719_ _
Name___Ashleen Bandesha_____________ Student Number__301245773_____

-------------------------------------------------------------------------------------------------------------------------------
-
Exercise 3.4.2: How many categories for Age are defined in these data? The age
category with the fewest households has how many households?

6 categories for Age are defined in these data. The age category with the fewest households,
minimum level size, has 5 households.

Exercise 3.4.3: How does spending vary with the number of children in a family?
Compare this output with the previous output. Which group is responsible for the overall
minimum and maximum spending that appears in the previous (non-group) output?

As the number of children in a household increases, the mean expenditure increases too. The
household with 2 children is responsible for the overall minimum and maximum spending
because their quartile results match the non-group output’s minimum and maximum quartile.

Exercise 3.4.6: Mr. White donates to the society three times each year. Mrs. Brown
donates twice each year. Who is more likely to have donated first?

Mrs. Brown is most likely to donate first because there is a negative correlation of -0.45 between
DonPerYear and YearsGive. Mrs. Brown donates less than Mr. White per year but has been a
donor for longer.

Exercise 3.5.2: By inspecting the histogram, predict whether the average or the median
of spending will be higher, and why. Can averages or medians be used meaningfully for
ordinal data? For interval data? Why or why not? Plot another histogram of Spending,
this time with 20 bins, purple fill, and red borders. See the “borders =” argument in the
hist Help file. Copy your histograms to a Word document.

The average of spending is expected to be higher because the histogram is right-skewed.


Medians can be used meaningfully for ordinal data since medians are a measure of the midpoint
of data and ordinal variables provide enough information to order data. Both averages and
medians can be used meaningfully for interval data since it is a numeric value that allows for
both order and addition.

Exercise 3.5.4: Redo the binning with equal intervals. Call the new variable
“Spend.Cat.Interval”, and show the frequency distribution of this variable.

Low Medium High


523 27 7

Exercise 3.5.5: Copy the plot into a word processing document.

Exercise 3.5.6: Plot the graph of New.Children. Copy the plot into a word processing
document.Comparing with the previous plot, approximately how many more households
are there with 3+ Children in the New.Children variable than there are households with
3 Children in the Children variable?

There are about 17 more households with the 3+ Children in the New.Children variable than
there are households with 3 Children in the Children variable.

Exercise 3.6.2: Highlight and copy the table into a word processing document.
[Figure.1]
Count:
New.Children
Spend.Cat 3+ Children 1 Child 2 Children
Low 11 99 78
Medium 32 62 89
High 57 26 103

[Figure.2]
Expected Count:
New.Children
Spend.Cat 3+ Children 1 Child 2 Children
Low 33.75224 63.11670 91.13106
Medium 32.85458 61.43806 88.70736
High 33.39318 62.44524 90.16158

[Figure.3]
Proportion:
New.Children
Spend.Cat 3+ Children 1 Child 2 Children
Low 0.1100000 0.5294118 0.2888889
Medium 0.3200000 0.3315508 0.3296296
High 0.5700000 0.1390374 0.3814815
[Figure.4]
Chi-Square:
Pearson's Chi-squared test data: Tbl.NC
X-squared = 77.445, df = 4, p-value = 6.053e-16

Exercise 3.6.5: Highlight and copy the counts table, the proportions table, and the chi-
squared test and paste into a word processing document.

[Figure.5]
Count
Income
Spend.Cat $0-$20k $20k-$30k $30k-$40k $40k-$50k $50k-$60k $60k-$75k $75k-$100k $100k+
Low 31 23 34 33 26 25 11 5
Medium 21 15 22 32 24 26 29 14
High 17 10 22 21 28 23 42 23

[Figure.6]
Proportions
Income
Spend.Cat $0-$20k $20k-$30k $30k-$40k $40k-$50k $50k-$60k $60k-$75k $75k-$100k $100k+
Low 0.4492754 0.4791667 0.4358974 0.3837209 0.3333333 0.3378378 0.1341463 0.1190476
Medium 0.3043478 0.3125000 0.2820513 0.3720930 0.3076923 0.3513514 0.3536585 0.3333333
High 0.2463768 0.2083333 0.2820513 0.2441860 0.3589744 0.3108108 0.5121951 0.5476190

[Figure.7]
Chi-square
Pearson's Chi-squared test data: Tbl.I
X-squared = 46.096, df = 14, p-value = 2.705e-05

Exercise 3.6.6 Repeat the analysis for BrthCntry. Copy and paste the results for
education, age, and birthCountry into a Word document.

Education
[Figure.8]
Count:
Education
Spend.Cat Elementary or less Post-secondary diploma Some or completed secondary Some post-secondary University degree
Low 10 45 84 18 26
Medium 3 47 81 22 27
High 6 47 74 24 32
[Figure.9]
Expected Count:
Education
Spend.Cat Elementary or less Post-secondary diploma Some or completed secondary Some post-secondary University degree
Low 6.368132 46.58791 80.10440 21.45055 28.48901
Medium 6.263736 45.82418 78.79121 21.09890 28.02198
High 6.368132 46.58791 80.10440 21.45055 28.48901

[Figure.10]
Proportion:
Education
Spend.Cat Elementary or less Post-secondary diploma Some or completed secondary Some post-secondary University degree
Low 0.5263158 0.3237410 0.3514644 0.2812500 0.3058824
Medium 0.1578947 0.3381295 0.3389121 0.3437500 0.3176471
High 0.3157895 0.3381295 0.3096234 0.3750000 0.3764706

[Figure.11]
Chi-square:
Pearson's Chi-squared test data: Tbl.Ed
X-squared = 6.1817, df = 8, p-value = 0.6269

Age:
[Figure.12]
Count:
New.Age
Spend.Cat 40 and over 29 and under 30 to 39
Low 27 67 90
Medium 48 37 95
High 46 21 116

[Figure.13]
Expected Count:
New.Age
Spend.Cat 40 and over 29 and under 30 to 39
Low 40.70201 42.04753 101.25046
Medium 39.81718 41.13346 99.04936
High 40.48080 41.81901 100.70018

[Figure.14]
Proportion:
New.Age
Spend.Cat 40 and over 29 and under 30 to 39
Low 0.2231405 0.5360000 0.2990033
Medium 0.3966942 0.2960000 0.3156146
High 0.3801653 0.1680000 0.3853821

[Figure.15]
Chi-square:
Pearson's Chi-squared test data: Tbl.NewAge
X-squared = 36.375, df = 4, p-value = 2.423e-07

BrthCntry
[Figure.16]
Count:
New.BC
Spend.Cat Other and S&E Europe Asia and Oceania Canada US, N&W Europe
Low 6 20 144 14
Medium 8 8 148 16
High 6 10 150 18

[Figure.17]
Expected Count:
New.BC
Spend.Cat Other and S&E Europe Asia and Oceania Canada US, N&W Europe
Low 6.715328 12.75912 148.4088 16.11679
Medium 6.569343 12.48175 145.1825 15.76642
High 6.715328 12.75912 148.4088 16.11679

[Figure.18]
Proportion:
New.BC
Spend.Cat Other and S&E Europe Asia and Oceania Canada US, N&W Europe
Low 0.3000000 0.5263158 0.3257919 0.2916667
Medium 0.4000000 0.2105263 0.3348416 0.3333333
High 0.3000000 0.2631579 0.3393665 0.3750000

[Figure.19]
Chi-square:
Pearson's Chi-squared test data: Tbl.New.BC
X-squared = 7.4833, df = 6, p-value = 0.2784
Exercise 3.6.7: Based on the five contingency tables you have done, and the chi-
square statistic, which demographic and socioeconomic factors have an impact on
household spending for children’s apparel? Select some detail from the tables that give
some managerially simple impressions of the strength of the impact. Which factors
appear to have no impact?

In order to assess if the socioeconomic and demographic variables had an impact on household
spending for children’s apparel, we conducted hypothesis testing where:
- H_null: there is no significance between the variable in question and household spending
on children’s apparel
- H_alternative: there is a significance between the variable in question and household
spending on children’s apparel

The variables that have an impact on household spending for children’s apparel include:
- Amount of children [p-value (6.053e-16) < significance level (0.05)]
- Income [p-value (2.705e-05) < significance level (0.05)]
- Age [p-value (2.423e-07) < significance level (0.05)]

The variables that appear to have no impact on household spending for children’s apparel
include:
- Education [ p-value (0.6269) > significance level (0.05)]
- Birth Country [p-value (0.2784) > significance level (0.05)]

In [Figure.3] we see that 57% of households with more than 3 children are in the highest
spending category, while only 11% of them in the lowest spending category. On the other end of
the spectrum we see that the majority (53%) of households with only 1 child are in the lowest
spending category. We can generalize that the more children a household has, the higher their
expenditure on children will be.

[Figure.6] shows 54.76% of individuals in the highest income bracket $100k+ are in the highest
spending category. In comparison, 44.92% of individuals in the lowest income bracket $0 - $20k
are in the lower spending category. It appears that household income and disposable income are
positively correlated. As the household income increases, the amount of spending on children’s
apparel increases as well.

In [Figure.14] 38.02% of individuals aged 40 and over are in the highest spending category, with
22.31% in the lowest spending category. In contrast, only 16.80% of individuals aged 29 and
under are in the highest spending category, with the majority of 53.60% in the lowest spending
category. Given that individuals aged 40 and over are most likely to have older children, it is
assumed they will spend more on children’s apparel.

Вам также может понравиться