Density Estimation and Data Normalization Is there any problem to first normalize data (for example, min-max one) then use kernel density estimation to get pdf of each sample?
Thanks.
 A: As the structure of the data remains unchanged, it doesn't make a difference. I've tried out a small example to verify it, Matlab code can be found below.
You can see that the structure in the scatter plots is the same. The differences between the density plots are likely due to the differences in bandwidth, as they are estimated for all three samples separately. Nonetheless, you can see that there are no notable differences in structure.
Plot

Code
rng(5)
colormap jet
% % original data
X1 = [normrnd(2,1,50,1),normrnd(6,4,50,1)];
X2 = [normrnd(4,2,70,1),normrnd(10,3,70,1)];
X=[X1;X2];
subplot(2,3,1)
scatter(X(:,1),X(:,2))
title('Scatter of original data')
xlim([min(X(:,1)),max(X(:,1))])
ylim([min(X(:,2)),max(X(:,2))])
gridx1 = linspace(min(X(:,1)),max(X(:,1)),100);
gridx2 = linspace(min(X(:,2)),max(X(:,2)),100);
[x1,x2] = meshgrid(gridx1, gridx2);
x1 = x1(:);
x2 = x2(:);
xi = [x1 x2];
subplot(2,3,4)
ksdensity(X,xi,'PlotFcn','contour');
title('Kernel density estimate on original data')
colorbar()

% % normalized to 0-1
X_zo(:,1) = (X(:,1)-min(X(:,1)))/(max(X(:,1))-min(X(:,1)));
X_zo(:,2) = (X(:,2)-min(X(:,2)))/(max(X(:,2))-min(X(:,2)));
subplot(2,3,2)
scatter(X_zo(:,1),X_zo(:,2))
title('Scatter of data normalized to 0-1')
xlim([min(X_zo(:,1)),max(X_zo(:,1))])
ylim([min(X_zo(:,2)),max(X_zo(:,2))])
gridx1 = linspace(min(X_zo(:,1)),max(X_zo(:,1)),100);
gridx2 = linspace(min(X_zo(:,2)),max(X_zo(:,2)),100);
[x1,x2] = meshgrid(gridx1, gridx2);
x1 = x1(:);
x2 = x2(:);
xi = [x1 x2];
subplot(2,3,5)
ksdensity(X_zo,xi,'PlotFcn','contour');
title('Kernel density estimate on 0-1 normalized data')
colorbar()

% % standardized z-score
X_s = zscore(X);
subplot(2,3,3)
scatter(X_s(:,1),X_s(:,2))
title('Scatter of standardized data')
xlim([min(X_s(:,1)),max(X_s(:,1))])
ylim([min(X_s(:,2)),max(X_s(:,2))])
gridx1 = linspace(min(X_s(:,1)),max(X_s(:,1)),100);
gridx2 = linspace(min(X_s(:,2)),max(X_s(:,2)),100);
[x1,x2] = meshgrid(gridx1, gridx2);
x1 = x1(:);
x2 = x2(:);
xi = [x1 x2];
subplot(2,3,6)
ksdensity(X_s,xi,'PlotFcn','contour');
title('Kernel density estimate on standardized data')
colorbar()

