Thanks to visit codestin.com
Credit goes to www.scribd.com

100% found this document useful (1 vote)
146 views4 pages

Measurement & Signal Processing

This document discusses measurement and signal processing concepts including: 1. Calculating the mean of a uniform distribution as (a+b)/2 and the variance as (b-a)^2/12. 2. For a given signal, about 9 data points have standard deviations greater than 3, marking them as outliers. 3. For sensing data sampled at 8192Hz for 10s, the population mean is -2.7761e-7, variance is 7.3196e-7, and standard deviation is 8.556e-4. A histogram with 50 bins is plotted. 4. For data in "Data.mat", the mean is 50.0385, variance is 35.886

Uploaded by

liu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
146 views4 pages

Measurement & Signal Processing

This document discusses measurement and signal processing concepts including: 1. Calculating the mean of a uniform distribution as (a+b)/2 and the variance as (b-a)^2/12. 2. For a given signal, about 9 data points have standard deviations greater than 3, marking them as outliers. 3. For sensing data sampled at 8192Hz for 10s, the population mean is -2.7761e-7, variance is 7.3196e-7, and standard deviation is 8.556e-4. A histogram with 50 bins is plotted. 4. For data in "Data.mat", the mean is 50.0385, variance is 35.886

Uploaded by

liu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Measurement & Signal Processing

a+b
1. Try to prove that the mean of a uniform distribution is E ( X ) =
2

( b + a )( b − a ) = a + b
b
xdx x2
E  X  =  xP ( x ) dx = 
b b
= =
a a b − a 2 (b − a ) a 2 (b − a ) 2

(b − a )
2

2. And the corresponding variance will be Var ( X ) =


12
Var ( X ) = E ( X −  )  = E  X  − E  X  =  x P ( x ) dx −  2
2 2 b
2 2
  a

( a + b ) = 4a 2 + 4ab + 4b2 − 3a 2 + 6ab + 3b 2


b 2
x3
= −
3(b − a ) a 4 12 12

(a − b)
2

=
12
3. For the given signal (“Signal_stdDev.mat”), how many data points that the corresponding
standard deviations are greater than 3 (i.e., outliers)? Please mark them on the figure.
(A) About 9 points
(B) Figure:
4. For the given sensing data “SampleData8192.txt”, it is sampled with 8192Hz for 10sec. Try
to plot the raw data and find:
(A) Population Mean(population). (5%).

Population Mean :  = −2.776110−7

(B) Population Variance & Standard deviation. (5%).

Population Variance: Var  X  = 7.3196 10−7

Standard deviation: Var  X  = 8.556 10−4

(C) Draw the corresponding histogram with 50 equivalent intervals. Provide your
MATLAB program. (5%)
Code.
%% --- Question 4---- %%
Data2 = importdata('SampleData8192.txt');
FS = 12;
%%
t = 1 : length(Data2);
time = t/8192;
figure()
plot(time, Data2)
xlabel('Time(s)', 'fontsize', FS)
ylabel('Signal','fontsize', FS)
%%
mu = sum(Data2(:, 1))/length(t);
var = sum((Data2(:, 1) - mu).^2)/length(t);
std = sqrt(var);
%
interval = 50;
[counter, bin ] = hist(Data2, interval);
freq = counter/sum(counter);
%
figure
hist(Data2, interval)
xlabel('Bins', 'fontsize', FS)
ylabel('Count','fontsize', FS)
%
figure
bar(bin, freq)
xlabel('Standard deviation', 'fontsize', FS)
ylabel('Frequency','fontsize', FS)
5. For the give file“Data.mat”, the sampled data response is shown as follows. Please plot
the histogram(with 50 bars) & Gaussian distribution. Also determine the mean value 
and the standard deviation 
Sampled data reponse:

Mean value:  = 50.0385 Varience: Var  X  = 35.886 Standard Deviation:  = 5.9905

You might also like