The unit for TickLength is peculiar. If you check out how it's documented on the colorbar page it says:
Tick mark length, specified as a scalar. Specify the tick length as a fraction of the colorbar axis length.
That 'length' is sort of like the length function in MATLAB, the longer direction.
In your case I think you want TickLength to be: colorbarpos(4)/colorbarpos(3)
set(gca,'xtick',[],'xticklabel',[],'ytick',[],'yticklabel',[],'color','w');
set(gcf,'units','pixel','position',[70,70,500,500],'papersize',[500,500],'color','w');
ax=gca;
colormap(jet(50));
caxis([0, 50]);
hcb=colorbar('SouthOutside');
hcb.Label.String='Test Color Bar';
axPos = ax.Position;
colorbarpos=hcb.Position;
% Position and scale for SouthOutside colorbar
colorbarpos(2)=0.032+colorbarpos(2);
colorbarpos(4)=0.5*colorbarpos(4);
hcb.Position = colorbarpos;
ax.Position = axPos;
set(hcb,'YTick',[0:1:50],'TickLength',colorbarpos(4)/colorbarpos(3));
set(hcb,'YTickLabel',{'';'1';'';'';'';'5';'';'';'';'';'10';'';'';'';'';'15';'';'';'';'';'20';'';'';'';'';'25';'';'';'';'';'30';'';'';'';'';'35';'';'';'';'';'40';'';'';'';'';'45';'';'';'';'';'50';});