Optimistic and Pessimistic Priors In Bayesian Statistics, while computing posteriors, we define priors based on our existing knowledge. For instance, if we are not sure about the data, we'd probably go with a uniform prior. What if we are optimistic or pessimistic about some measure of the data? What kind of prior should we use? I'd highly appreciate some examples as I come from a non-stat background.

Suppose you are about to do a public opinion poll
about Candidate A's popularity compared with one
other candidate for the same office. The two candidates are affiliated with opposing political parties.
In the past such elections have often been close to 50-50.
There have already been a few polls of unknown
credibility showing Candidate A slightly ahead.
In these circumstances you might use the prior
distribution $\mathsf{Beta}(150, 130).$ It has mean about 0.536, median about the same, and
it shows probability a little over $1/4$ that
the election will be very close: $P(0.48 < p_A < 0.52) = 0.267,$ where $p_A$ Candidate A's current favorability.
qbeta(.5, 150, 130)
[1] 0.5357994
diff(pbeta(c(.48, .52), 150, 130))
[1] 0.26742

This prior is very roughly equivalent to having
a small impartially administered poll of 280 subjects
of whom 150 favored Candidate A.
Of course, especially if you had no prior information at all, you might use
an uninformative prior distribution such as the Jeffreys prior $\mathsf{Beta}(0.5, 0.5)$ or a uniform prior as you suggest in your Question $\mathsf{Beta}(1,1).$ But one advantage of a Bayesian approach is the opportunity to begin with whatever information or
opinion you feel comfortable using.
If a poll of 900 randomly chosen subjects shows
500 for Candidate A, then your mildly informative
prior gives the posterior distribution $\mathsf{Beta}(650, 530)$ and a 95% posterior probability interval
(credible interval) of $(0.522, 0.579)$ for $p_A.$
qbeta(c(.025,.975), 650, 530)
[1] 0.5224025 0.5791291

The Jeffreys prior would give the credible interval
(also, often used as a frequentist confidence interval)
of $(0.523, 0.587).$ It is not a lot different from the
credible interval above, using our mildly informative
prior.
qbeta(c(.025,.975), 500.5, 400.5)
[1] 0.5229567 0.5877977

Note: As a campaign progresses,
the popularity of any one candidate can rise
or fall very quickly. So, a prudently managed campaign will use a number of polls over time.
