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?

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$).
