Probability

Hi,

I’m new to all this, so I apologise if this is the wrong forum, but I have a quesiton about probability.

Is it possible to create multiple animations, for this sake called x and y and then on the event of clicking something like a button, there is, perhaps, a 25% chance that animation x will be played and a 75% chance that animation y will appear?

If anyone can help or point me in the direction of help, it will be greatly appreciated.