Help With VBA in Excel ? Writing a function using probabilities ?
I need help writing a function in VB in excel that decides the winner of a game, the probabilities are input into an excel worksheet by the user. There are 2 players and 4 different probabilities for each player:
a = probability of first shot being allowed
b = probability of winning first shot
c = probability of second shot being allowed
d = probability of winning second shot
The game is played between 2 players, in each game one is chosen to be the server and the other the receiver. Service alternates game by game. A single game consists of a sequence of points played with the same player serving. A game is won when a player has (a) scored four or more points and (b) has two or more points more than his opponent
My function needs to take the server (chosen at random) and return the winner of a particular point, calculated according to the above probabilities.
I have NO idea where to start here, any help please?????
I need help writing a function in VB in excel that decides the winner of a game, the probabilities are input into an excel worksheet by the user. There are 2 players and 4 different probabilities for each player:
a = probability of first shot being allowed
b = probability of winning first shot
c = probability of second shot being allowed
d = probability of winning second shot
The game is played between 2 players, in each game one is chosen to be the server and the other the receiver. Service alternates game by game. A single game consists of a sequence of points played with the same player serving. A game is won when a player has (a) scored four or more points and (b) has two or more points more than his opponent
My function needs to take the server (chosen at random) and return the winner of a particular point, calculated according to the above probabilities.
I have NO idea where to start here, any help please?????