In an event you can get a bronze, silver, or gold medal for your participation. I've been awarded gold in cases where I came in late and hardly put in any effort, and I've seen bronze when I worked my behind off.
So my question(s): What factors determine the type of medal awarded?
As noted in the comments it may be very hard to give a definitive answer to this question, this is why I rephrased so I'm not asking for a formula, but merely for whether a factor plays a role or not (factors like being in the area or not, participation time, doing damage, etc). If there's no official word about this, then it should still be possible to find an answer through experimentation (e.g. doing the same event twice once with the factor and once without).
Update: after re-reading the comment to this question I realize that this question is still a bit too broad, even after my earlier changes. There's easily 10 to 15 potential factors, and 8+ different event types, making for 80 to 120 things to test for. Changing the question to be about just one event type might make it answerable, but would change the meaning too much. The question's interesting (at least, to me) nonetheless, so I welcome any improvements to make it more answerable. Until then, I'm voting to close as well.
For reference, borrowed from the GW2 Wiki, this is the medal thing I'm talking about:
On that very wiki, the section Event Rewards, on the Dynamic Event page has a formula for the amount of karma received, but no info about how the type of medal is determined.
Has anyone experimented with the variables, measured anything, etc? Or is there official info from the makers of GW?