You don't state if it matters if the first half are 1 and the second half are 5s only that 50% should be each.
If it doesn't matter then you can do something like this:
UPDATE tb1
SET rating =
(CASE
WHEN itemId <=
(SELECT MAX(itemID)
FROM
(SELECT TOP (50) percent itemID
FROM tb1
GROUP BY itemID
ORDER BY itemID
) x
) THEN 5
ELSE 1
END)
Or if your records don't have any deleted items or you're not strictly concerned about being exactly 50% then you could simply do something like this:
UPDATE tb1
SET rating = CASE
WHEN (itemID % 2) = 1 THEN 1
ELSE 5
END
the benefit of this approach is you can do things like this:
UPDATE tb1
SET rating =
CASE (itemID % 5)
WHEN 1 THEN 1
WHEN 2 THEN 7
WHEN 3 THEN 10
WHEN 4 THEN 40
ELSE 5
END