Discussion about math, puzzles, games and fun.   Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °

You are not logged in.

## #1 2012-09-02 23:29:09

tina123
Full Member

Offline

### get mean location in histogram

Let say we have image data like this .

0 0 0 0 1 1 5 4 666 1 1 0 0 0 0 0 0 0 0

Now histogram would  be like this

Number of occurrence of 0 ==> 12
Number of occurrence of 1 ==> 4
Number of occurrence of 4 ==> 1
Number of occurrence of 5 ==> 1
Number of occurrence of 666 ==> 1

mean : 12 +4 +1 +1 +1 / total number of points.
mean = 19/19 == > 1

Now issue is i wanna  show mean in color form in histogram .
but how  can we get location of mean in histogram like in x bins and y probability ?
Where will be mean locate?

Last edited by tina123 (2012-09-02 23:34:27)

## #2 2012-09-03 01:38:16

bob bundy
Moderator

Offline

### Re: get mean location in histogram

hi tina123

The mean is not 1

It is also not a histogram and the data range is not continuous.

I wonder: did you want 666 or rather 6 then 6 then 6.

Bob

You cannot teach a man anything;  you can only help him find it within himself..........Galileo Galilei

## #3 2012-09-03 10:35:14

tina123
Full Member

Offline

### Re: get mean location in histogram

Hy its 666 ..

Hy wait .. I have to get histogram 1st .
and then get mean from histogram  ..

thanks

Last edited by tina123 (2012-09-03 10:36:50)

## #4 2012-09-03 17:38:32

bob bundy
Moderator

Offline

### Re: get mean location in histogram

hi tina123,

http://www.mathsisfun.com/definitions/histogram.html

you will see you require a range of data for each frequency to make a histogram.

The best you can do with these data is a bar graph.

Please explain where the data comes from.

Bob

You cannot teach a man anything;  you can only help him find it within himself..........Galileo Galilei

## #5 2012-09-03 18:02:47

tina123
Full Member

Offline

### Re: get mean location in histogram

#### bob bundy wrote:

hi tina123,

http://www.mathsisfun.com/definitions/histogram.html

you will see you require a range of data for each frequency to make a histogram.

The best you can do with these data is a bar graph.

Please explain where the data comes from.

Bob

Well you make me more confuse .
As far as i understand , histogram is the occurrence Of Pixels  .

so ,

0 0 0 0 1 1 5 4 666 1 1 0 0 0 0 0 0 0 0

Now histogram would  be like this

Number of occurrence of 0 ==> 12
Number of occurrence of 1 ==> 4
Number of occurrence of 4 ==> 1
Number of occurrence of 5 ==> 1
Number of occurrence of 666 ==> 1

to show it in bar graph,

0 is 12 times .
1 is 4 timse .
4 is 1 times
5 is 1 times
and 666 is 1 times .

so if we wanna get mean of hitogram . we can do  like
sum of  all occurence / totalbins.

That's what i know .

bob bundy
Moderator

Offline

hi tina123,