Q2)
a. wolvesbornbystate=sum(wolf,2)
This will give the sum of each row.
b. wolfbirthchange=diff(wolf,[],2)
This will calculate the difference between two elements of adjacent
columns, row-wise. ie- difference between columns' data.
c. wolvesbornTX=sum(wolf(39,:))
This will give the sum of all elements in row 39.
d. wolvesbornsince2010=sum(sum(wolf(1:50,10:15)))
wolf(1:50,10:15) will return all elements in columns 10 to 15
(years 2010 to 2015), 1:50 is to select all rows in those
columns.
sum(wolf(1:50,10:15)) will calculate sums of each of these returned
columns
sum(sum(wolf(1:50,10:15))) will finally give the sum of all these
above sums.
e. wolfTxPercentage=wolvesbornTX/(sum(sum(wolf))- wolvesbornTX)
*100
sum(sum(wolf)) will give the sum of all the elements in the matrix
and (sum(sum(wolf))- wolvesbornTX) will give the sum of all
elements except Texas.
You may replace wolfTxPercentage with sum(wolf(39,:)) if
required.
Q3)
a. 18 students from Section 1 averaged around 8.5 hours of sleep a
day.
b. For this we need to add up all the uppper edge values of the
each bar of the histogram. The first bar is approximately 8, the
second, approximately 13, the third, 18 and so on.
So, the approximate number of students in section 1 shown here
is-8+13+18+2+3+1+1=46
c. No of students in section 3 sleeping an average of 8
hours=20
Total No of students in section 3=58
Therefore, percentage of students in section 3 sleeping a average
of 8 hours =20/58*100=34.48%
d. Both distributions are similar in that both have their highest
values around the same points,ie- most students in both sections
sleep around 8 hours.
Data for section 3 is slightly more continuous.
Q4)
a. i. Median=45; this is the line inside the box.
ii. The Inter Quartile Range=0.41 to 0.45; this is 25 to 75
percentile: the area spanned by the box.
iii. The 75th percentile is 0.45; the upper edge of the box.
iv. The largest value is 0.52, the upper end of the upper
whisker.
v. Top fence value- not entirely sure what this means; do you
require the upper inner fence or the upper outer fence (outlier) or
something else?
b. The position of the top whisker represents the highest percentage of students reporting caffeine.
c. The notches represent the confidence interval around the median; it is the range within which we can say with fair certainty that the true value lies.
d. 1. Caffeince consumption is greater among males than
females.
2. The value of the lowest percentage of the males consuming
caffeine is around the value of the median for females consuming
caffeine.
3. The spread of the percentage of females reporting caffeine is
greater than that of the males.
All pages please 15 year wolf is a MATLAB: 2. ao pes/2 pes each) Translating sim...