Probability program equation in app.

In summary, the conversation is about programming a new feature for an iPhone/Android app. The feature involves allowing stores to create free offers with different probabilities of winning. The app user scans a barcode at the store and has a chance to win one of the prizes. The main concern is ensuring that the correct number of winners is selected and that the process is not manipulated. The thread is six months old and the original poster has not returned to clarify the issue.
  • #1
Logger
28
0
Hi there,

I am getting an iphone/android app developed and there is a new part that needs to be programmed.

A store can create a free offer and assign the random probability odds of winning that prize.
If they create 3 offers for their restaurant with the following win odds.(they can have as many prizes as they want so the equation/code must be dynamic so based on the number of prizes the formula should always give out the correct prizes0

Prize 1 = Free starter with win odds 10:1
Prize 2 = Free main course with win odds 50:1
Prize 3 = Free main course with win odds 200:1

When the app user goes into the store they scan a barcode. This is where I am stuck, I want the user to have a chance to win any of the prizes and for the correct amount of people to have won a prize as I don't want the equation/code to be wrong and the store has to give out much more free stuff than what they had bargained for,I also don't want too few winners as people will stop using it if they are not winning.

Can anyone suggest the best way to code for this(I have no programming experience but have a team in India programming it but want to give them proper instructions). I was thinking the only way that it could be done is when you scan the barcode the program code will randomly select one of the prizes available and then apply the random odds of that prize to see if you won.

Is there a better way to approach this?
Is there a way to combine the odds?

Can anybody suggest how I can get this section to work right. If you need more info please post and I can answer.

Thanks in advance,
 
Technology news on Phys.org
  • #2
Where does the barcode come from, and do many users get the same barcode?
In other words, do you want that the barcode determines who wins?

If not, how is the barcode related to that?
Do you want random winners, based on nothing else but the app and chance? In that case, it looks dangerous to let the user app do that, as it could be manipulated (or tricked, by scanning an arbitrary barcode generated by the user).
Do you plan some control mechanism, and how does it work?
 
  • #3
This thread is half a year old and Logger didn't return to clarify the problem.
 

Related to Probability program equation in app.

1. What is a probability program equation?

A probability program equation is a mathematical formula used to calculate the likelihood of a certain event occurring. It takes into account the total number of possible outcomes and the number of desired outcomes to determine the probability of a specific outcome.

2. How is the probability program equation used in apps?

The probability program equation is often used in apps to generate random outcomes or to make predictions based on previous data. It can also be used to determine the likelihood of certain actions or events happening within the app.

3. What are the key components of a probability program equation?

The key components of a probability program equation include the total number of possible outcomes, the number of desired outcomes, and the mathematical operations used to calculate the probability. These components may vary depending on the specific equation being used.

4. How accurate are probability program equations in apps?

The accuracy of a probability program equation in an app depends on the quality of the data used and the complexity of the equation. Generally, the more data that is available and the more complex the equation, the more accurate the results will be.

5. Can probability program equations be customized for specific needs?

Yes, probability program equations can be customized for specific needs by adjusting the variables and mathematical operations used in the equation. This allows for more accurate and tailored results for different scenarios and purposes.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
15
Views
1K
Replies
9
Views
1K
  • Programming and Computer Science
Replies
3
Views
662
Replies
6
Views
2K
  • Programming and Computer Science
2
Replies
37
Views
2K
  • Programming and Computer Science
Replies
11
Views
1K
  • Programming and Computer Science
Replies
5
Views
2K
  • Programming and Computer Science
Replies
4
Views
1K
  • Programming and Computer Science
Replies
19
Views
3K
Replies
9
Views
2K
Back
Top