Water samples are collected from ten different locations along a beach, eight di
ID: 3323514 • Letter: W
Question
Water samples are collected from ten different locations along a beach, eight different slides of bacterial cultures are prepared from each water sample, and the number of bacteria on the slides is counted. The following table gives the resulting count data:
105 97 245 163 207 134 218 199
160 196 221 154 228 131 180 178
157 151 175 201 183 153 174 154
190 76 101 142 149 200 186 174
199 115 193 167 171 163 87 176
121 120 181 160 194 184 165 145
160 150 181 168 158 208 133 135
172 171 237 170 180 167 176 158
156 229 158 148 150 118 143 141
110 133 123 146 169 158 135 149
(1) Find the (sample) mean of the bacterial count.
You may wish to try the MATLAB function mean(x).
(2) Find the (sample) standard deviation of bacterial count.
You may wish to try the MATLAB function std(x)
(3) Find the range (i.e., the maximum and the minimum values) of the bacterial count.
You may wish to try the MATLAB functions max(x), min(x), and range (x).
(4) Divide the range into N = 10 equal-length segments (hereafter called “bins”), and for each bin, find its bounds (aj, bj) as well as its center cj.
(5) Place each measured bacterial count xi into that bin whose lower bound is less than or equal to xi and whose upper bound is greater than xi; thereafter, for each bin count the number of xi assigned to it (= nj).
(6) Plot a histogram of the measured bacterial counts using N = 10 bars.
Try the MATLAB functions hist(x,N) and bar(c, n)
(7) Produce a vector Y of measured bacterial counts in which the counts are arranged in ascending order.
(8) Determine the median of measured bacterial counts (at the center of the sorted vector Y) by writing a script that is usable for both odd and even number of samples.
Try the MATLAB function median(x).
(9) Define a random variable as the bacterial count on a single slide, and estimate (i.e., determine approximately) the probability mass function of this random variable evaluated at the bin centers cj.
(10) Estimate the (cumulative) probability distribution function of the same random variable, evaluated at the same points (i.e. argument values) cj.
Try the MATLAB function cumsum(nj/Snj).
(11) Produce a plot of the cumulative probability distribution function (found above) as a function of its argument, in which the plot has a title, axes have a scale and a label, and the graph is piece-wise linear between points.
(12) Plot both the histogram and the cumulative probability distribution function in a single graph.
PLEASE TURN IN BOTH YOUR SCRIPT AND THE SOLUTIONS AND PLOTS
So far I have 1-8 done, but I need help at step 9. Is the random variable supposed to be the height of the values for the histogram? How should I code this to be centered at cj?
Explanation / Answer
Using Excel we can find mean standard deviation ,and range :
First plug your given data in one column.
mean = avrage (A1: A80) = 162.66
standard deviation = stdev(A1:A80) = 33.77
Range = max(A1:A80) - min(A1:A80) = 245 - 76 = 169
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.