topic Re: Transforming distributions to highlight spread of values in Discussions
https://community.jmp.com/t5/Discussions/Transforming-distributions-to-highlight-spread-of-values/m-p/213309#M42678
<P>Hi <LI-USER uid="2687"></LI-USER>, </P><P> </P><P> Thanks for the feedback. Yeah, I have looked into that, but it's not really what I'm after.</P><P> </P><P> What I think I need to do is actually transform the data, but I'm not sure what the best way to do it is. If I try the "standard" options of transforming the data, the resulting distributions don't distribute out the data across a broader range.</P><P> </P><P> For example, in the last set of distribution images I posted, the highlighted bin contains only 3 different integer values within that bin (65, 66, 67) [it's hard to see, I know]. But, what I'd like to do is transform it so that it has more of a continuous distribution from say, 0 to 10. If I transform the data with a log (ln) function, it still is only binning those three integers into three new non-integer rational numbers, not transforming the integer into a continuous distribution.</P><P> </P><P> I think what I'd like to do is transform the integers, e.g. all values of 66, into a continuous distribution, but do this to the entire set of integers, which span the range 27 to 90. Is there a way to transform integers into a probability?</P><P> </P><P>Thanks for the feedback and help!,</P><P>DS</P>Mon, 17 Jun 2019 13:14:08 GMTDS2019-06-17T13:14:08ZTransforming distributions to highlight spread of values
https://community.jmp.com/t5/Discussions/Transforming-distributions-to-highlight-spread-of-values/m-p/213162#M42657
<P>Dear JMP Community,</P><P> </P><P> Machine info: W7 Enterprise 64-bit, JMP Pro 14.1.0</P><P> </P><P> I am interested in transforming a column of data to help highlight the distribution in values within binning ranges. The original data are integers and more or less normally distributed (see Y3 distribution below), but I'd like to transform the data in such a way that it takes the data in a bin range and spreads it out so as to better capture the range of data within a bin (see Y2 distribution). I am including several images to help explain what I'm trying to do -- they are artificial images showing the link, just there to show the desired outcome.</P><P> </P><P> I don't think it's something quite as easy as doing a "center" or "standardize" transformation as neither of those really spread out the data enough (see the highlighted portions in the images). Nor do the Box Cox, or the log transforms. Maybe it's something that would require more than one transformation?</P><P> </P><P> Any suggestions are much appreciated.</P><P> </P><P>Thanks!,</P><P>DS</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Snap1.jpg" style="width: 718px;"><img src="https://kvoqx44227.i.lithium.com/t5/image/serverpage/image-id/17768i603D34D6D085C1E9/image-size/large?v=1.0&px=999" title="Snap1.jpg" alt="Snap1.jpg" /></span><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Snap2.jpg" style="width: 718px;"><img src="https://kvoqx44227.i.lithium.com/t5/image/serverpage/image-id/17769i689FB70EE19D78AC/image-size/large?v=1.0&px=999" title="Snap2.jpg" alt="Snap2.jpg" /></span><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Snap4.jpg" style="width: 716px;"><img src="https://kvoqx44227.i.lithium.com/t5/image/serverpage/image-id/17770i061214E1522FAC34/image-size/large?v=1.0&px=999" title="Snap4.jpg" alt="Snap4.jpg" /></span></P>Fri, 14 Jun 2019 20:12:28 GMThttps://community.jmp.com/t5/Discussions/Transforming-distributions-to-highlight-spread-of-values/m-p/213162#M42657DS2019-06-14T20:12:28ZRe: Transforming distributions to highlight spread of values
https://community.jmp.com/t5/Discussions/Transforming-distributions-to-highlight-spread-of-values/m-p/213244#M42666
<P>If you want to look at a specific range of the data in a histogram, and to change it's binning precision level, you can easily do that by interactively stretching the axis scale and then using the Hand tool, the bin sizes can be changed.</P>
<P>Is this what you are needing to do?</P>
<P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="histograms.PNG" style="width: 678px;"><img src="https://kvoqx44227.i.lithium.com/t5/image/serverpage/image-id/17771i4D67E8FCED79855A/image-size/large?v=1.0&px=999" title="histograms.PNG" alt="histograms.PNG" /></span></P>Sun, 16 Jun 2019 03:35:40 GMThttps://community.jmp.com/t5/Discussions/Transforming-distributions-to-highlight-spread-of-values/m-p/213244#M42666txnelson2019-06-16T03:35:40ZRe: Transforming distributions to highlight spread of values
https://community.jmp.com/t5/Discussions/Transforming-distributions-to-highlight-spread-of-values/m-p/213309#M42678
<P>Hi <LI-USER uid="2687"></LI-USER>, </P><P> </P><P> Thanks for the feedback. Yeah, I have looked into that, but it's not really what I'm after.</P><P> </P><P> What I think I need to do is actually transform the data, but I'm not sure what the best way to do it is. If I try the "standard" options of transforming the data, the resulting distributions don't distribute out the data across a broader range.</P><P> </P><P> For example, in the last set of distribution images I posted, the highlighted bin contains only 3 different integer values within that bin (65, 66, 67) [it's hard to see, I know]. But, what I'd like to do is transform it so that it has more of a continuous distribution from say, 0 to 10. If I transform the data with a log (ln) function, it still is only binning those three integers into three new non-integer rational numbers, not transforming the integer into a continuous distribution.</P><P> </P><P> I think what I'd like to do is transform the integers, e.g. all values of 66, into a continuous distribution, but do this to the entire set of integers, which span the range 27 to 90. Is there a way to transform integers into a probability?</P><P> </P><P>Thanks for the feedback and help!,</P><P>DS</P>Mon, 17 Jun 2019 13:14:08 GMThttps://community.jmp.com/t5/Discussions/Transforming-distributions-to-highlight-spread-of-values/m-p/213309#M42678DS2019-06-17T13:14:08ZRe: Transforming distributions to highlight spread of values
https://community.jmp.com/t5/Discussions/Transforming-distributions-to-highlight-spread-of-values/m-p/213329#M42681
<P>I don't think there is any "best" way to do what you want to do. Since you are *ADDING* variability, you will need to make some assumptions. For example, suppose the value is 65. We have to assume that the 65 is "correct" but greater precision is not available due to measurement error (or reporting round-off or something like that). One way to accomplish this is to create a column of random normal variables with a mean of zero and a standard deviation of approximately 0.33. Now add this column of random numbers to your integer values. This should "convert" the integers into a continuous scale. I used a standard deviation of 0.33 because 3*.33 is 1, so it should be adding numbers roughly between -1 and +1. Therefore, you should still be reasonably close to the integer value. </P>
<P> </P>
<P>As a proof of concept, I created a column of 100 integers, called X. I created the RanNor column as a set of random normal numbers. Finally NewX is simply X + RanNor. Here are the results:</P>
<P> </P>
<P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 760px;"><img src="https://kvoqx44227.i.lithium.com/t5/image/serverpage/image-id/17778iE7279391FF58096C/image-size/large?v=1.0&px=999" title="Capture.PNG" alt="Capture.PNG" /></span></P>
<P> </P>
<P>NewX has a very similar shape to X, but you can see by the statistics that it does indeed have some "additional" variability without massively altering the statistics of the original data.</P>
<P> </P>
<P>Is this what you are looking for??</P>
<P> </P>
<P>I should add that the histograms should look similar since the purpose is to change the data, but not so much as to alter the message the data convey. To show more of the bars like you wanted in your original post, you will need to change the bin width as TXNelson suggested. Then you will see the spread around each of the integer values.</P>Mon, 17 Jun 2019 15:30:18 GMThttps://community.jmp.com/t5/Discussions/Transforming-distributions-to-highlight-spread-of-values/m-p/213329#M42681Dan_Obermiller2019-06-17T15:30:18ZRe: Transforming distributions to highlight spread of values
https://community.jmp.com/t5/Discussions/Transforming-distributions-to-highlight-spread-of-values/m-p/213330#M42682
<P><FONT style="background-color: #ffffff;">It sounds like what you need to do, is to use the ability in JMP to generate your own graph, of whatever design you want it to be. You use JSL for this.<BR />And yes, you can get the probability of a given distribution by using </FONT>Normal Distribution() function or the xxx Distribution() function for the distribution you are interested in. Here is an example of the Normal Distribution() function</P>
<PRE><CODE class=" language-jsl">Names Default To Here( 1 );
New Window( "Example: Normal Distribution",
y = Graph Box(
Y Scale( 0, 1 ),
X Scale( -4, 4 ),
XName( "q" ),
Pen Color( "red" );
Y Function( Normal Distribution( q ), q );
)
);</CODE></PRE>Mon, 17 Jun 2019 14:28:57 GMThttps://community.jmp.com/t5/Discussions/Transforming-distributions-to-highlight-spread-of-values/m-p/213330#M42682txnelson2019-06-17T14:28:57ZRe: Transforming distributions to highlight spread of values
https://community.jmp.com/t5/Discussions/Transforming-distributions-to-highlight-spread-of-values/m-p/213610#M42732
<P>Hi <LI-USER uid="2687"></LI-USER> and <LI-USER uid="3194"></LI-USER>,</P><P> </P><P> Your suggestions were very helpful, and I do believe this is the direction I need to go.</P><P> </P><P> I'm thinking that I might need to modify things a bit, though. I'm thinking that in order to best try and preserve the distribution of the original data, to try and do something like you suggest, but with a normal mixture function instead. As <LI-USER uid="2687"></LI-USER> pointed out, I am basically trying to take my CDF, which shows the integer property of my data as a stepped-CDF, and turn it into a continuous function.</P><P> </P><P> I can get the location, dispersion, and probability values of a normal 3-mixture fit (from the continuous fit option in the distribution platform) and use those as the vector inputs to the normal mixture function, but I'm not sure if this is appropriate. For example, I'm not sure if I should work off the original data, a standardized version of it, or a centered version. All version result in a normal 3 mixture as the best fit, but with different dispersions and locations (probabilities are all the same, which is not too surprising.</P><P> </P><P> Ultimately, I need to take the final distribution and feed it to a logist function so I can get a probability of an event as either a yes/no and evaluate the IfMax of the yes/no logist functions (there are too many levels in my column to assign a profit matrix to the data).</P><P> </P><P> Thanks for your feedback and input as it helps to ponder the best approach for analyzing my data.</P><P> </P><P>DS</P>Tue, 18 Jun 2019 20:41:14 GMThttps://community.jmp.com/t5/Discussions/Transforming-distributions-to-highlight-spread-of-values/m-p/213610#M42732DS2019-06-18T20:41:14Z