I am not much of a math guy, but know some basics of pdfs, pmfs, Bayes theorems, probability distribution and stuffs. I am actually trying to build a Bayesian Network that models the personality of humans. For that I need independent probabilitiy distributions of different factors (such as age), and their effects, such as happiness.

The way in which I am collecting data is on the following Google Sheet. https://docs.google.com/spreadsheets/d/1OTMSUjalaT3K7sbwyfhvxooV65kI6X9umb6LCZDSUEk/edit#gid=0

My Question here is, Given the data above (in the gSheet) How Can I Calculate the pdf for P(Age), and conditional probability distribution of P(Age | Effects) where Effects = things like Happiness, Anger..

I'm like on a blackout on how to calculate these stuffs. Can anyone help? Please


1 Answer 1


You have a lot of learning to do. To begin, you can estimate $P(A|B)$ as the fraction of elements where B is true that also have A true. For example, $P(age=41|happiness=high)$ is approximately the ratio of the count of all members with age 41 and happiness level of high over the count of all those with happiness level high.

  • $\begingroup$ Is there, like a dynamic way to calculate for example: P(age = some_function_that_describes_how_age_varies | happiness = some_function_that describes_how_happiness_varies ) ? $\endgroup$
    – cipher
    Jul 11, 2015 at 17:52
  • $\begingroup$ It seems like your data is in spreadsheet format. I am not a spreadsheet expert, but you might want do check out the COUNTIF and COUNTIFS commands. If you move your data to a more powerful computing environment (MAPLE, Mathematica, R) you have more options $\endgroup$
    – John McGee
    Jul 11, 2015 at 17:57
  • $\begingroup$ The sheet is just to explain what I am trying to achieve. I could move my data to other envs. but Is the only way to do this is to make my data discrete? $\endgroup$
    – cipher
    Jul 11, 2015 at 18:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .