00:01
Alright, so for this problem, i'll begin by copying in the dataset, so we'll say x has the value 2 -303 -1101.
00:10
Then, to find the mean using the appropriate function, we'd say mu is equal to just the mean of x.
00:19
So you can find that the mean values 1 .25.
00:22
Additionally, we can type in just median is the median of x.
00:26
So let's see here, i'll call it med.
00:28
Med is the median of x, so the median value is 1, and i'll call it v is the variance of x.
00:37
So the function is just var of x.
00:40
So v is var of x.
00:41
We can see v is about 1 .643 roughly.
00:45
Now for part b, to write a script without using the built -in functions, we know that the mean value is found by taking the sum of all of the individual results.
00:59
Without using the built -in functions, we can simply do this as sum of x divided by the length of x.
01:08
So calculating mu again, actually i'll call this mu -2, indicating we calculated it a different way.
01:15
So mu -2 is 1 .25.
01:18
To find the median, what we need to do is first find the location, i'll call it l, which is determined by taking the length of x, and then dividing it by 2.
01:32
So l is 4, or pardon me, actually, technically it's length of x plus 1 over 2.
01:39
Technically.
01:41
So we get 4 .5.
01:43
What that means is that the median should be the average of the 4th and 5th values.
01:49
So we'd say med 2 is equal to x4, actually i'll put it within brackets, so it's x4 plus x5 divided by 2.
02:02
Oh, whoops.
02:05
Let me correct that.
02:07
That's x square brackets.
02:09
So we have, oh, something went wrong here.
02:12
One moment...