Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

normal distribution graph to show data

Contributor ,
Jun 27, 2014 Jun 27, 2014

In a survey, I am getting back user data (d Prime scores) that I would like to display on a normal distribution graph or chart, to give the survey taker a picture of where their score is on that normal distribution graph. Quite a challenge!

I can create the graph with the correct range, as a PNG, but am not sure how to set up AS3 script that could place the score in the correct location based on its specific value? For example (just the graph without any specific score),

nDist1.png

Has anyone seen something like this that can visually display results? An example? (If there were a better way to display results, a different chart, etc. I would try that, as well.)

Any help appreciated.

TOPICS
ActionScript
1.6K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Jun 27, 2014 Jun 27, 2014

it's easy if you use the suggestion i made.

place that bitmap of a bell curve on the flash stage.

using the info panel place your mouse at -2.25,0 on that bitmap and note the x and y values in the info panel (eg, 100,400).

move your mouse to 5.75,0 on that bitmap and note the x and y values in the info panel (eg, 500,400).

to indicate a users score (eg, 2.1) on that bitmap, use:

var m:Number;

var b:Number;

var yPixel:Number = 400;

parameterF(-2.25,100,5.75,500);

graphF(2.1);

function graphF(xVal:Number):

...
Translate
Community Expert ,
Jun 27, 2014 Jun 27, 2014

you could just fake it and assign their score using linear interpolation.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Jun 27, 2014 Jun 27, 2014

Hi kglad,

Thank you for your reply. Currently, I am using a bar graph which moves up or down depending on score, adding one of 4 comments (highly negative, below average, above average, highly positive) based on data ranges. Not bad, but as mentioned, would like to provide, if possible, a reasonably accurate graphing, instead.

Sounds like it may not be possible without extensive scripting capability which I don't have. Or not possible at all.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 27, 2014 Jun 27, 2014

it's easy if you use the suggestion i made.

place that bitmap of a bell curve on the flash stage.

using the info panel place your mouse at -2.25,0 on that bitmap and note the x and y values in the info panel (eg, 100,400).

move your mouse to 5.75,0 on that bitmap and note the x and y values in the info panel (eg, 500,400).

to indicate a users score (eg, 2.1) on that bitmap, use:

var m:Number;

var b:Number;

var yPixel:Number = 400;

parameterF(-2.25,100,5.75,500);

graphF(2.1);

function graphF(xVal:Number):void{

var mc:MovieClip=new MC();  // where MC is the class you assign to whatever movieclip symbol you want to indicate the user's score

addChild(mc);

mc.x=m*xVal+b;

mc.y=yPixel;

}

function parameterF(x1:Number,y1:Number,x2:Number,y2:Number):void{

m=(y1-y2)/(x1-x2);

b=y1-m*x1;

}

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Jun 27, 2014 Jun 27, 2014

Hi kglad,

Thank you. I will try to get this working and update.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 27, 2014 Jun 27, 2014

you're welcome.

p.s. please mark helpful/correct responses.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Jul 02, 2014 Jul 02, 2014

Update: I was able to fully implement, and it works great! Thank you again.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 02, 2014 Jul 02, 2014

you're welcome,

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Jul 25, 2017 Jul 25, 2017
LATEST

For more challenging similar question about graphing in both X and Y, see https://forums.adobe.com/message/9724107#access_token=eyJ4NXUiOiJpbXNfbmExLWtleS0xLmNlciIsImFsZyI6Il...

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines