Distribution type doesn’t change by linear transition of data

Today I understood, that distribution type desn’t change if linear transformation is done to data.

For example, if we take some bunch of data D, that is uniformly distributed in interval [-PI , PI], afterwards we are calculating  other data D1(i)=5-2*D(i);

What will be the distribution? well It’s logical, but it wasn’t obvious for me (I guess I needed to pay more attention in my class of statistics). It will be uniform with interval [5-2*(-PI),5-2*(PI)]=>~[11.2832, -1.2832]=>[-1.2832,11.2832]=>~[-1.3,11.3]. We can se, that distribution stand still. It may be mirrored if coefficient of multiplication is negative (in our case -2).

Example(in MATLAB):

>> D=pi-2*pi*rand(1,50000);
>> hist(D,100);
>> D1=5-2*D;
>> hist(D1,100);
As you can see, our theorethical calcul was confirmed.
My datapoints is in range of [-1.22,11.22].
Nevertheless, in this fast example you can’t see very well (you can see, if you look carefully), that actually distribution is flipped. (left-to-right).
Hope someone found it interesting/useful. I was working, when found out this logical but not obvious little detail.

Birkas: ,

Komentēt

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Mainīt )

Twitter picture

You are commenting using your Twitter account. Log Out / Mainīt )

Facebook photo

You are commenting using your Facebook account. Log Out / Mainīt )

Google+ photo

You are commenting using your Google+ account. Log Out / Mainīt )

Connecting to %s


%d bloggers like this: