Should I tick a multiple choice question at random or not in an exam with different weight for correct and wrong answer? The JEE exam contains only questions with 4 answer choices.

*

*If you select right choice then you get 4 marks

*If you select wrong  you get -1 marks( lose)

*If you don't select anything you don't get or lose any mark.

Given this scenario, is it a better idea to select any choice of every question in which student has no idea of all 4 choices?
 A: Suppose you have a question with $n$ boxes, and exactly one box is correct.  Then we have the following expected gains of points $g$:

*

*No mark: $g_\text{blank}=0$

*Correct mark: $g_\text{correct}=4\frac 1n$

*Incorrect mark: $g_\text{wrong}=(-1)\frac {n-1}n = \frac 1n - 1$
where the last two $g$'s are of the form
$$ g_* = \text{gain} × \text{probability-of-that-gain.}$$
You gain an advantage (with equal par in the $=$ case) when
$$g_\text{correct} + g_\text{wrong} \geqslant g_\text{blank}$$
More specifically, when
$$4\frac 1n +\frac1n-1
= \frac 5n -1 \geqslant 0
$$
This means if $n\leqslant 5$ then guessing it won't hurt or is an advantage. If you don't want to waste time painting crosses, then guess only the $n\leqslant 4$ questions, and leave the $n \geqslant6$ questions alone.
From here it's easy enough to generalize for other settings of gains and penalties like $n=3$, or when more than one cross is needed for a correct answer$^1$.  And it changes again when you need, say, exactly 2 crosses.

Intuitively I think that if you have at least four unanswered questions, it is good to randomly start guessing,

The number of questions you have already answered at that point does not matter.  You can judge each remaining question independently of all the others: All what counts in your scenario are the gains, the penalties, how much boxes there in a specific question, etc.
But also note that even with a positive expactation value for the additional points, there will still be some variance in the sample data.  After all, you rely on luck which includes that you might fare worse.

$^1$Only one out of $2^n-1$ possible answers is good (one answer is the blank one, therefore 1 out of $2^n-1$ and not 1 out of $2^n$).
A: Firstly tackling your dilemma of utility function -
If you're on the threshold of around ~$100$ marks (which used to be cutoff of JEE Advanced $6-7$ years back when I gave it) it's highly improbable that even if you do end up clearing JEE mains to go forward to give JEE advanced you'd be able to get a seat at IIT's via JEE Advanced given only ~$10-12$k people are selected from pool of ~$150k$ students who clear mains(Aka you'll be at the bottom rung and a heavy underdog anyways).
So, your only utility function is trying to maximize your score as if you're above mains clearing threshold it doesn't matter and if you're below or around it it still doesn't matter. At the end it's just a screening exam for IIT's and an entrance exam for other prestigious colleges.
Now coming to the actual expectation value(probability of scoring) for every random guess -
E represents ideal expected score per guess
P represents the probability of said event happening
Case 1 (Not able to eliminate any options and making a random guess) -
P(correct guess) $= \dfrac14$
P(incorrect guess) = $\dfrac34$
E(random guess) = $1/4 \times4-3/4 \times -1$ = $\dfrac{+1}{4}$ marks per question attempted
A bit too low in my opinion to give any decent edge for this strategy and if you guess only a couple of questions, there's chances you get dealt a bad card that day and you end up with bit too many wrong answers.
Though this strategy works wonders if you can eliminate even 1 or if possible 2 then it's pretty amazing (still risky but risk reward parameters improve greatly)
Case 2(able to eliminate 1 option) -
P(correct) = $\dfrac{1}{3}$
P(incorrect) = $\dfrac{2}{3}$
E(1 eliminated) = $1/3*4-2/3*-1$ = $\dfrac{2}{3}$ per question attempted.
Case $3$ (able to eliminate $2$ options) -
P(correct) = $\dfrac{1}{2}$
P(incorrect) = $\dfrac12$
E(2 eliminated) = $1/2*4-1/2*-1$ = $\dfrac32$ per question attempted.
Risk always being $-1$ per incorrect guess which has $\dfrac34 probability of happening.
So, in my personal opinion I feel that Case 1 is kind of useless if you're gonna be guessing only a couple questions as potential downside is not worth the gains. But as soon as you're able to prune your options a bit (1 or 2 elimination), The inherent risk reward makes much more sense to me. In the end the decision is all yours depending on your frame of mind, style of attempting paper, current prep level.
Regarding my personal experience, I could never leave a question if Expectation value was Positive no matter the risk.
I eliminated $2$ options each for $7$ questions in Mains Physics(for chapters which I didn't study) and guessed and ended up a bit too lucky with all $7$ correct giving me $+28$ which could have given me $-7$ in worst case and I hit jackpot with $\dfrac{1}{128}$ probability so lucky me I guess.
A: The main relevant literature that comes to mind is portfolio theory: how do you value risk? (There really isn't a single reference I can give you. Portfolio theory is an entire class/textbook/body of work.)
Let's denote your parameters as: the marks for correct option ($m_{c}$), the marks for wrong option ($m_w$), the marks for unanswered ($m_u$) and the total question pool for where the guessing is done ($T$).

If you just want to maximize your expected marks (i.e. you are "risk-neutral"), then simply compare the expected score on a question from guessing vs not.
The expected marks from not guessing on a question is $m_{u}$.
The expected marks for guessing is:
$$\frac{T-1}{T}m_w + \frac{1}{T}m_{c}$$
Since, only $1/T$ of the time will you guess correctly. (More generally, if you are making a "smart" guess, then just reweight according to the probability of getting the question correct/wrong.)
Hence, only guess if:
$$m_u \leq \frac{T-1}{T}m_w + \frac{1}{T}m_{c}$$
Often times exams are designed so that these exactly equal. In which case, you should generally guess under the assumption that you can do better than random chance.

If you are risk-averse, i.e. you don't want randomness in your marks, and guessing does not increase your expected marks, then you should never guess.
If you are risk-loving, i.e. you want randomness in your marks, and guessing does not decrease your expected marks, then you should always guess.
The complicated scenarios are when your risk preferences go in the opposite direction of maximizing your expected marks. Then, you're going to have to do some calculus to solve your optimization problem and determine how much guessing you want to do. There's no simple answer then.

What are your risk preferences?
Suppose all you care about is reaching a certain threshold. Generally (e.g. with normal distributions), if your expected marks on the exam are below that threshold, then you are risk-loving. Conversely, if your expected marks are above that threshold, then you are risk-averse.
More generally, if your utility is a convex function of your marks on the exam, then you are risk-loving.
Conversely, if your utility is a concave function of your marks on the exam, then you are risk-averse.
Suppose you want to maximize your expected percentile and marks are normally distributed. Your utility function then looks like a normal cdf, which is concave/risk-averse if you're confidently in the top half and convex/risk-loving if you're confidently in the bottom half.
Suppose you're really competitive and only care about the expected number of other students you'd have to meet before meeting someone better than yourself. If the hazard function is increasing, which it is for normal distributions, then you are risk-loving.

Not much more can be said generally. You'd have to tell us exactly what your risk preferences are. But, hopefully your cases are covered by the above section.
A: $\S \  1.$ Is it better to guess if the only objective is to score at least some fixed grade?
This would be relevant when someone just wanted to pass, or only cared about getting eg. over $95 \%$.
Suppose you have answered $C$ of the $90$ questions correctly, so $R=90-C$ questions remain. Of these you guess $G$ questions, $0\leq G \leq R$. We first find the minimum number of correct guesses to reach a target grade $t^*$. If you have already reached this target grade, $4C\geq t^*$. Denote $G_{\pm}$ the number of correct (+) and incorrect (-) guesses, thus $G=G_++G_-$.
Current grade (without guessing) is $4C$ so you need $(t^*-4C)>0$ more points.
Points from guessing: $4G_+-G_-=4G_+-(G-G_+)=5G_+-G$.
Equating these
$$
5G_+-G\stackrel{!}{=}t^*-4C
$$
Solve for $G_+$ (remember that $G$, $C$ and $t^*$ are known quantities)
$$
G_+=\frac{1}{5}\left(t^*+G-4C \right)
$$
Where it is understood that we round up in the case of non-integer $G_+$.
The probability $\mathcal{P}_k$ of getting exactly $k$ guesses correct out of $G$ total guesses when each guess has a $1/4$ probability of being correct is given by the binomial distribution
$$
\mathcal{P}_k=\left( \matrix{G \\ k}\right) \left(\frac{1}{4}\right)^k \left(\frac{3}{4}\right)^{G-k}
$$
The probability $\mathcal{P}$ of getting at least a grade of $t^*$ is the probability of getting at least $G_+$ successes in $G$ trials
$$
\mathcal{P}=1-\sum\limits_{k=0}^{G_+  -1} \left( \matrix{G \\ k}\right) \left(\frac{1}{4}\right)^k \left(\frac{3}{4}\right)^{G-k}
$$
We are interested in $\mathcal{P}$ as a function of $G$, the number of guessed questions. Surprisingly, $\mathcal{P}$ is not a monotone function of $G$! Here are some plots of $\mathcal{P}$ vs $G$ with $C=70$:

If $4C\geq t^*$ (left plot) it is optimal to guess at most $4C-t^*$ questions, as even if all these guesses are incorrect you still make the target grade with probability $\mathcal{P}=1$.
If $4C< t^*$, the optimal number of guesses that maximizes $\mathcal{P}$ is close to but not necessarily equal to $R$. Notice in the $t^*=316$ plot it is best to leave exactly one question blank. By playing with the graphs, it appears that it is always optimal to leave between zero and three questions blank, and guess the rest. I conjecture that the optimal value depends upon $t^* \mod 5$ and $R \mod 5$, as $\mathcal{P}$ has cycles of length five in both these quantities.
Generalization: let us write a general form for $\mathcal{P}$. Let there be $N$ questions total (previously we had $N=90$), each with $n$ options (one of which is correct). Correct answers get $g_+$ points and incorrect answers get $g_-$ points. The probability that a random guess is correct is $1/n$, and the probability it is incorrect is $(1-1/n)$. Repeating the calculation gives
$$
G_+=\frac{t^*-Cg_+-Gg_-}{g_+-g_-} \\
\mathcal{P}=1-\sum\limits_{k=0}^{G_+  -1} \left( \matrix{G \\ k}\right) \left(\frac{1}{n}\right)^k \left(1-\frac{1}{n}\right)^{G-k}
$$
$\S \  2.$ Guessing when trying to maximize the total grade
The expectation value of marks $\bar{g}_1$ from guessing one question is (using all the notation as in $\S  \ 1.$)
$$
\bar{g}_1=\frac{1}{n}g_+ + \left(1-\frac{1}{n}\right)g_-
$$
In the case of your example, $n=4$, $g_+=4$, and $g_-=-1$ yielding$^\dagger$
$$
\bar{g}_1=+\frac{1}{4}
$$
Each guess is an independent random variable, and the expectation value of guessing $G$ questions is thus $\bar{g}_G=\frac{G}{4}$. If maximizing this expectation value is the objective, then you should always guess rather than leave any question blank (which has an expectation value of zero).
$\dagger$ It is possible there is a minimum overall grade of zero (rather than $-90$), in which case: the expectation value of guessing more questions than those already answered is a little higher than this.
$\S \ 3.$ Variance
Guessing introduces variance. The variance $\sigma_1^2$ associated with one guess is
$$
\sigma_1^2 = \bar{g_1^2}-\bar{g_1}^2 \\
\sigma_1^2 = \frac{1}{n}g_+^2 + \left(1-\frac{1}{n}\right)g_-^2-\left(\frac{1}{n}g_+ + \left(1-\frac{1}{n}\right)g_- \right)^2
$$
After some algebra
$$
\sigma_1^2 =\frac{n-1}{n^2}(g_+ - g_-)^2
$$
For your example $\sigma_1^2 \approx 4.7$. The variance of grade for guessing $G$ questions is
$$
\sigma_G^2 =G \frac{n-1}{n^2}(g_+ - g_-)^2
$$
Notice that both the expectation value and variance increase with $G$, the number of guessed questions. If you wanted to take this further, you could associate the 'risk' associated with guessing questions with the variance.
