(this post assumes that by going to space you mean going to orbit, if you also include high alititude suborbital missions things get more vauge).
What are the numerator and denominator in that ratio,
The numerator is pretty small, especially if you count by missions rather than by people (which makes sense because generally when a spacecraft fails it kills everyone onboard). At another answer says if you go from "countdown to landing" you get four accidents. If you also include testing on the pad prior to countdown you get five.
and is it improving over the years?
It's hard to say because the numbers are so small. 4-5 fatal accidents total on orbital missions is about one per decade on average. The last fatal accident was in 2003 but whether that means safety is improving or is just good luck is difficult to say.
Footnote on suborbital missions.
I'm aware of two suborbital craft that were considered spacecraft by their promotors and broke up killing thier pilots. I'm not aware of any comprehensive list of such craft though. I'm also not positive if the virgin galactic craft was actually on a suborbital mission at the time (my memory of the news articles at the time is it was but I may be misremebering and the wikipedia article on the crash doesn't say)
https://en.wikipedia.org/wiki/X-15_Flight_3-65-97
https://en.wikipedia.org/wiki/VSS_Enterprise_crash