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

You are not logged in.

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

tina123
Member
Registered: 2012-04-29
Posts: 83

### 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 01:34:27)

Offline

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

bob bundy
Registered: 2010-06-20
Posts: 8,354

### 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

Children are not defined by school ...........The Fonz
You cannot teach a man anything;  you can only help him find it within himself..........Galileo Galilei

Offline

## #3 2012-09-02 12:35:14

tina123
Member
Registered: 2012-04-29
Posts: 83

### 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-02 12:36:50)

Offline

## #4 2012-09-02 19:38:32

bob bundy
Registered: 2010-06-20
Posts: 8,354

### 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

Children are not defined by school ...........The Fonz
You cannot teach a man anything;  you can only help him find it within himself..........Galileo Galilei

Offline

## #5 2012-09-02 20:02:47

tina123
Member
Registered: 2012-04-29
Posts: 83

### 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 .

Offline

## #6 2012-09-02 20:38:04

bob bundy
Registered: 2010-06-20
Posts: 8,354

### Re: get mean location in histogram

hi tina123,

How does an occurence of pixels =  http://en.wikipedia.org/wiki/Pixel lead to 19 data values ?

Bob

Children are not defined by school ...........The Fonz
You cannot teach a man anything;  you can only help him find it within himself..........Galileo Galilei

Offline